app

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: GPL-3.0 Imports: 11 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) 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) 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 {
	GetUserById(ctx context.Context, userId string) (*storage.User, error)
	GetUserByNickname(ctx context.Context, nickname string) (*storage.User, error)
	SearchUsers(ctx context.Context, search string, limit int, excludeUser string) ([]*storage.User, error)
	UpdateDeviceToken(ctx context.Context, userId string, deviceToken []byte, tokenType storage.DeviceTokenType) error
	UpdateUser(ctx context.Context, user *storage.User) (*storage.User, error)
	UpsertUser(ctx context.Context, user *storage.User) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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