Documentation ¶
Index ¶
- Variables
- type Board
- type Config
- type CreateGameRequest
- type CreateGameResponse
- type GameSettings
- type GetGameModel
- type GetGamePlayer
- type GetGameRequest
- type GetGameResponse
- type NewPlayer
- type Service
- func (s *Service) CreateGame(ctx context.Context, game CreateGameRequest) (CreateGameResponse, error)
- func (s *Service) GetGame(ctx context.Context, req GetGameRequest) (GetGameResponse, error)
- func (s *Service) GetPlayerUrl(playerId string) string
- func (s *Service) WaitingFor(ctx context.Context, req WaitingForRequest) (WaitingForResponse, error)
- type WaitingForRequest
- type WaitingForResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var AllBoards = []Board{ BoardTharsis, BoardHellas, BoardElysium, }
Functions ¶
This section is empty.
Types ¶
type CreateGameRequest ¶
type CreateGameRequest struct { Players []NewPlayer Settings GameSettings }
type CreateGameResponse ¶
type GameSettings ¶ added in v0.3.19
type GetGameModel ¶ added in v0.3.2
type GetGameModel struct { HasFinished bool Players []GetGamePlayer }
type GetGamePlayer ¶ added in v0.3.2
type GetGameRequest ¶ added in v0.3.2
type GetGameRequest struct {
SpectatorId string
}
type GetGameResponse ¶ added in v0.3.2
type GetGameResponse struct { Game GetGameModel Raw map[string]any }
func GetGameResponseFromRaw ¶ added in v0.3.2
func GetGameResponseFromRaw(raw map[string]any) (GetGameResponse, error)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) CreateGame ¶
func (s *Service) CreateGame(ctx context.Context, game CreateGameRequest) (CreateGameResponse, error)
func (*Service) GetGame ¶ added in v0.3.2
func (s *Service) GetGame(ctx context.Context, req GetGameRequest) (GetGameResponse, error)
func (*Service) GetPlayerUrl ¶
func (*Service) WaitingFor ¶
func (s *Service) WaitingFor(ctx context.Context, req WaitingForRequest) (WaitingForResponse, error)
type WaitingForRequest ¶
type WaitingForRequest struct {
PlayerId string
}
type WaitingForResponse ¶
Click to show internal directories.
Click to hide internal directories.