game

package
v0.0.0-...-4144884 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth interface {
	CurrPlayer(context.Context) (*pb.Player, error)
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(auth Auth, store Store) *Manager

func (*Manager) CurrentGames

func (m *Manager) CurrentGames(ctx context.Context, _ *pb.Empty) (*pb.GamesResponse, error)

func (*Manager) Game

func (m *Manager) Game(ctx context.Context, req *pb.IDRequest) (*pb.GameMessage, error)

func (*Manager) Invite

func (m *Manager) Invite(ctx context.Context, req *pb.InviteRequest) (*pb.Player, error)

func (*Manager) StartGame

func (m *Manager) StartGame(ctx context.Context, msg *pb.GameMessage) (*pb.GameMessage, error)

type Store

type Store interface {
	StartGame(context.Context, string, *pb.Game) (*pb.Game, error)
	PlayerGames(context.Context, string) (pb.PlayerGames_Iterator, error)
	GameDetail(_ context.Context, playerID, gameID string) (*pb.Game, string, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL