Documentation ¶
Index ¶
Constants ¶
View Source
const ( MovePath = "/move" PingPath = "/ping" DefaultMoveLimit = 2 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Game ¶
type GameResult ¶
type GameStatus ¶
type GameStatus string
const ( GameScheduled GameStatus = "scheduled" GameDraw GameStatus = "draw" GameBlackWins GameStatus = "black_wins" GameWhiteWins GameStatus = "white_wins" )
func (GameStatus) String ¶
func (s GameStatus) String() string
type GameWithDetails ¶
func (GameWithDetails) TableName ¶
func (c GameWithDetails) TableName() string
type GamesService ¶
type GamesService interface { List() ([]Game, error) ListDetailed() ([]*GameWithDetails, error) }
type Match ¶
type Match struct { ID int64 `gorm:"column:id"` PID1 int64 `gorm:"column:player_1_id"` PID2 int64 `gorm:"column:player_2_id"` CommonDBFields }
type MatchesService ¶
type MoveRequest ¶
type Player ¶
type Player struct { Name string Version int64 Path string ID int64 `gorm:"column:id"` AuthorId int64 `gorm:"column:user_id"` CommonDBFields }
Player is an AI agent running on an HTTP server
type PlayersService ¶
type RankingsService ¶
type Record ¶
type Record struct { GameID int64 `gorm:"column:game_id"` TurnNum int64 `gorm:"column:turn_num"` State string `gorm:"column:state"` CommonDBFields }
type Services ¶
type Services struct { Rankings RankingsService Games GamesService Matches MatchesService Players PlayersService Users UsersService DB *gorm.DB }
type User ¶
type User struct { Name string Email string ID int64 `gorm:"column:id"` CommonDBFields }
type UsersService ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.