Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidInput = Error{Err: "Invalid Input"} ErrBadSession = Error{Err: "Bad Session"} ErrUserCreateFailed = Error{Err: "Could not create user"} ErrUserExists = Error{Err: "A user with that name already exists"} ErrUserDoesNotExist = Error{Err: "User does not exist, you must register first"} ErrDatabaseError = Error{Err: "Database Error"} ErrForbidden = Error{Err: "Forbidden"} ErrInvalidLobby = Error{Err: "Invalid Lobby ID"} ErrLobbyNotFound = Error{Err: "Lobby Not Found"} ErrLobbyNotJoined = Error{Err: "You are not a member of this lobby"} ErrLobbyJoined = Error{Err: "You are already a member of this lobby"} ErrLobbyFull = Error{Err: "Lobby is full"} ErrLoggedIn = Error{Err: "You must be logged out to use this endpoint"} ErrSpectating = Error{Err: "You must be an active participant in the game to use this endpoint"} ErrNotYourTurn = Error{Err: "It is not currently your turn"} ErrTileOccupied = Error{Err: "Tile is already occupied"} ErrInvalidPlay = Error{Err: "Invalid tile placement"} ErrGameInProgress = Error{Err: "Game is already in progress"} )
Functions ¶
This section is empty.
Types ¶
type CreateLobby ¶
type DeleteMember ¶
type DeleteMember struct {
UserID *uint32 `json:"id"`
}
type LobbyState ¶
type LobbyState string
const ( LobbyWaitingForPlayers LobbyState = "waiting" LobbyInGame LobbyState = "inGame" LobbyRoundOver LobbyState = "roundOver" )
type PutMember ¶
type PutMember struct { // Join codes, for later Code string `json:"code"` Type constant.MemberType `json:"type"` }
type SquareSet ¶
type SquareSet struct { Squares *[]Square `json:"squares"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` }
SquareSet exists to make GORM happy about using the JSON datatype
func (*SquareSet) GormDBDataType ¶
func (*SquareSet) GormDataType ¶
type UpdateLobby ¶
type UpdateLobby struct {
State LobbyState `json:"state,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.