interceptor

package
v0.3.22 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GameNotifier added in v0.3.21

type GameNotifier interface {
	NotifyGameFinished(ctx context.Context, gameId string) error
}

type MarsClient

type MarsClient interface {
	GetGame(ctx context.Context, req mars.GetGameRequest) (mars.GetGameResponse, error)
	WaitingFor(ctx context.Context, req mars.WaitingForRequest) (mars.WaitingForResponse, error)
}

type Notifier

type Notifier interface {
	NotifyUser(ctx context.Context, userId string) error
}

type Service

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

func NewService

func NewService(origin http.Handler, storage Storage, mars MarsClient, notifier Notifier, gameNotifier GameNotifier) *Service

func (*Service) PlayerInputHandler

func (s *Service) PlayerInputHandler(w http.ResponseWriter, r *http.Request)

type Storage

type Storage interface {
	GetGameByPlayerId(ctx context.Context, playerId string) (*storage.Game, error)
}

Jump to

Keyboard shortcuts

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