Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientMessage ¶
type ClientMessage interface { String() string Name() string //name of the client that sent the message }
ClientMessage is an interface for messages that can be blocked.
type JoinMessage ¶
func NewJoinMessage ¶
func NewJoinMessage(subject string) *JoinMessage
func NewLeaveMessage ¶
func NewLeaveMessage(subject string) *JoinMessage
func (JoinMessage) String ¶
func (m JoinMessage) String() string
type Message ¶
type Message interface {
String() string
}
Message is an interface for dealing with various types of messages.
type MessageList ¶
messageList is a mutex enhanced linked list of messages.
type RestMessage ¶
restMessage is a message sent from the REST API.
func (*RestMessage) String ¶
func (m *RestMessage) String() string
String returns a rest message string formated as Time [Name]: Text.
type SendMessage ¶
SendMessage includes the text of the message, the time it was sent and the client who sent it. It is used primarily for normal messages sent to the room with send.
func NewSendMessage ¶
func NewSendMessage(text string, sender string) *SendMessage
NewSendMessage creates a new client message
func (SendMessage) Name ¶
func (m SendMessage) Name() string
Name returns the name of the client that send the message.
func (SendMessage) String ¶
func (m SendMessage) String() string
String formats the clientMessage as time [Sender]: text.
type ServerMessage ¶
serverMessage is a message containing only a string sent from the server.
func NewServerMessage ¶
func NewServerMessage(text string) *ServerMessage
NewServerMessage returns a new ServerMessage.
func (ServerMessage) String ¶
func (m ServerMessage) String() string
String returns the string representation of the serverMessage.
type TellMessage ¶
type TellMessage struct { Text string TimeString string Time time.Time Sender string Reciever string ToReciever bool Type string }
TellMessage is a message sent by a tell.
func NewTellMessage ¶
func NewTellMessage(text string, sender string, reciever string, toReciever bool) *TellMessage
func (TellMessage) Name ¶
func (m TellMessage) Name() string
func (TellMessage) String ¶
func (m TellMessage) String() string