Discover Packages
github.com/armsnyder/othelgo
pkg
messages
package
Version:
v0.0.3
Opens a new window with list of versions in this module.
Published: Dec 1, 2020
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
func RegisterCustomValidations(v *validator.Validate)
type Decorate struct {
Decoration string `json:"decoration"`
}
type Error struct {
Error string `json:"error"`
}
type GameOver struct {
Message string `json:"message"`
}
type Hello struct {
Version string `json:"version" validate:"semver"`
}
type HostGame struct {
Nickname string `json:"nickname" validate:"required,max=10,alphanumspace,lowercase"`
}
type JoinGame struct {
Nickname string `json:"nickname" validate:"required,max=10,alphanumspace,lowercase,nefield=Host"`
Host string `json:"host" validate:"required,max=10,alphanumspace,lowercase"`
}
type Joined struct {
Nickname string `json:"nickname"`
}
type LeaveGame struct {
Nickname string `json:"nickname" validate:"required,max=10,alphanumspace,lowercase"`
Host string `json:"host" validate:"required,max=10,alphanumspace,lowercase"`
}
type ListOpenGames struct{}
type OpenGames struct {
Hosts []string `json:"hosts"`
}
type PlaceDisk struct {
Nickname string `json:"nickname" validate:"required,max=10,alphanumspace,lowercase"`
Host string `json:"host" validate:"required,max=10,alphanumspace,lowercase"`
X int `json:"x" validate:"min=0,max=7"`
Y int `json:"y" validate:"min=0,max=7"`
}
type StartSoloGame struct {
Nickname string `json:"nickname" validate:"required,max=10,alphanumspace,lowercase"`
Difficulty int `json:"difficulty" validate:"oneof=0 1 2"`
}
type Wrapper struct {
Message interface{}
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.