Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AckMsg ¶
type AckMsg struct { Username string Message string Type AckMsgType }
AckMsg represents the message sent back by ssh-chat
type AckMsgType ¶
type AckMsgType int
AckMsgType represents what kind of message was acknowledged
const ( // AckMsgPublic means public message was acknowledged AckMsgPublic AckMsgType = iota // AckMsgPrivate means private message was acknowledged AckMsgPrivate )
type JoinMsg ¶
type JoinMsg struct { Username string Status UserConnStatus }
JoinMsg represents message published by server about people joining or leaving
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser is used to understand lines sent by ssh-chat
type PrivateMsg ¶
PrivateMsg represents message sent to the user directly
type RoomMsg ¶
type RoomMsg interface{}
RoomMsg is one of {UsernameChangeMsg, JoinMsg, PrivateMsg, PublicMsg, ActionMsg}
type SystemMsg ¶
type SystemMsg struct {
Message string
}
SystemMsg represents the system messages ssh-chat sends periodically
type UserConnStatus ¶
type UserConnStatus int
UserConnStatus represents user's connected status
const ( // UserJoined means the user connected to the server UserJoined UserConnStatus = iota // UserLeft means the user disconnected from the server UserLeft )
func (UserConnStatus) String ¶
func (u UserConnStatus) String() string
type UsernameChangeMsg ¶
UsernameChangeMsg represents message published by server about users changing their names
Click to show internal directories.
Click to hide internal directories.