Documentation
¶
Index ¶
- Variables
- func GetWordDefinition(word string) string
- func SanitizeDefinition(word, definition string) string
- func ShuffleWord(word string) string
- type AnswerMessage
- type Client
- type Def
- type Definition
- type HintMessage
- type Hub
- type Meaning
- type NickMessage
- type ScoreMessage
- type SuccessMessage
- type WordmashMessage
Constants ¶
This section is empty.
Variables ¶
View Source
var ( WsReadBufferSize = 1024 WsWriteBufferSize = 1024 WsTimeoutSeconds = 10 ChannelSize = 255 )
Functions ¶
func GetWordDefinition ¶
GetWordDefinition returns the word definition from the Free Dictionary API
func SanitizeDefinition ¶
SanitizeDefinition replaces occurrences of the word in the definition with asterisks
func ShuffleWord ¶
Types ¶
type AnswerMessage ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GameSession ¶
func (c *Client) GameSession()
GameSession handles the business logic for a connected client
type Definition ¶
type Definition struct {
Meanings []Meaning `json:"meanings"`
}
type HintMessage ¶
type HintMessage struct {
Hint string `json:"hint"`
}
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
type NickMessage ¶
type NickMessage struct {
Nick string `json:"nickname"`
}
type ScoreMessage ¶
type SuccessMessage ¶
type SuccessMessage struct {
Success bool `json:"success"`
}
type WordmashMessage ¶
type WordmashMessage struct {
Wordmash string `json:"wordmash"`
}
Click to show internal directories.
Click to hide internal directories.