app

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: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GameService added in v0.2.0

type GameService interface {
	CreateGame(ctx context.Context, players []*storage.User, settings mars.GameSettings) error
	GetUserGames(ctx context.Context, userId string) ([]*game.UserGame, error)
}

type Service

type Service struct {
	api.UnsafeUsersServer
	api.UnsafeGamesServer
	// contains filtered or unexported fields
}

func NewService

func NewService(storage Storage, game GameService) *Service

func (*Service) CreateGame added in v0.2.0

func (*Service) CreateGameV2 added in v0.3.20

func (*Service) GetEloLeaderboard added in v0.3.18

func (*Service) GetGames added in v0.2.0

func (*Service) GetMe added in v0.0.4

func (*Service) Login

func (*Service) SearchUser added in v0.1.0

func (*Service) UpdateDeviceToken added in v0.1.0

func (*Service) UpdateMe added in v0.0.4

type Storage added in v0.0.3

type Storage interface {
	GetLeaderboard(ctx context.Context, ut storage.UserType, limit int64) ([]*storage.User, error)
	GetUserById(ctx context.Context, userId string) (*storage.User, error)
	GetUserByNickname(ctx context.Context, nickname string) (*storage.User, error)
	SearchUsers(ctx context.Context, req storage.SearchUsers) ([]*storage.User, error)
	UpdateDeviceToken(ctx context.Context, userId string, deviceToken []byte, tokenType storage.DeviceTokenType) error
	UpdateUser(ctx context.Context, req storage.UpdateUser) (*storage.User, error)
	UpsertUser(ctx context.Context, req storage.UpsertUser) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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