Documentation ¶
Index ¶
- func Serve(ctx context.Context, port string, s *grpc.Server) error
- type Games
- type InMemoryGames
- func (g *InMemoryGames) ReadBoard(ctx context.Context, id string) (*tpb.Board, error)
- func (g *InMemoryGames) ReadGame(ctx context.Context, id string) (*spb.Game, error)
- func (g *InMemoryGames) WriteBoard(ctx context.Context, id string, b *tpb.Board) error
- func (g *InMemoryGames) WriteGame(ctx context.Context, gm *spb.Game) error
- type InMemoryOperations
- type InMemoryQueue
- type Operations
- type Queue
- type Rounds
- type Tronimoes
- func (t *Tronimoes) CreateAccessToken(ctx context.Context, req *spb.CreateAccessTokenRequest) (*spb.AccessTokenResponse, error)
- func (t *Tronimoes) CreateGame(ctx context.Context, req *spb.CreateGameRequest) (*spb.Operation, error)
- func (t *Tronimoes) GetBoard(ctx context.Context, req *spb.GetBoardRequest) (*tpb.Board, error)
- func (t *Tronimoes) GetGame(ctx context.Context, req *spb.GetGameRequest) (*spb.Game, error)
- func (t *Tronimoes) GetMoves(ctx context.Context, req *spb.GetMovesRequest) (*spb.GetMovesResponse, error)
- func (t *Tronimoes) GetOperation(ctx context.Context, req *spb.GetOperationRequest) (*spb.Operation, error)
- func (t *Tronimoes) LayTile(ctx context.Context, req *spb.LayTileRequest) (*tpb.Board, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InMemoryGames ¶
type InMemoryGames struct {
// contains filtered or unexported fields
}
func (*InMemoryGames) WriteBoard ¶
type InMemoryOperations ¶
type InMemoryOperations struct {
// contains filtered or unexported fields
}
func (*InMemoryOperations) NewOperation ¶
func (*InMemoryOperations) ReadOperation ¶
func (*InMemoryOperations) WriteOperation ¶
type InMemoryQueue ¶
type InMemoryQueue struct { Games Games Operations Operations Rounds *Rounds // contains filtered or unexported fields }
func (*InMemoryQueue) AddPlayer ¶
func (q *InMemoryQueue) AddPlayer(ctx context.Context, playerID string, req *spb.CreateGameRequest, operationID string) error
func (*InMemoryQueue) MakeNextGame ¶
func (q *InMemoryQueue) MakeNextGame(ctx context.Context) error
type Operations ¶
type Tronimoes ¶
type Tronimoes struct { Operations Operations Queue Queue Games Games Rounds *Rounds }
func (*Tronimoes) CreateAccessToken ¶
func (t *Tronimoes) CreateAccessToken(ctx context.Context, req *spb.CreateAccessTokenRequest) (*spb.AccessTokenResponse, error)
func (*Tronimoes) CreateGame ¶
func (*Tronimoes) GetMoves ¶
func (t *Tronimoes) GetMoves(ctx context.Context, req *spb.GetMovesRequest) (*spb.GetMovesResponse, error)
func (*Tronimoes) GetOperation ¶
Click to show internal directories.
Click to hide internal directories.