Documentation ¶
Index ¶
- type GameService
- type Service
- func (s *Service) CreateGame(ctx context.Context, req *api.CreateGame_Request) (*api.CreateGame_Response, error)
- func (s *Service) CreateGameV2(ctx context.Context, req *api.CreateGameV2_Request) (*api.CreateGameV2_Response, error)
- func (s *Service) GetEloLeaderboard(ctx context.Context, req *api.GetEloLeaderboard_Request) (*api.GetEloLeaderboard_Response, error)
- func (s *Service) GetGames(ctx context.Context, _ *api.GetGames_Request) (*api.GetGames_Response, error)
- func (s *Service) GetMe(ctx context.Context, _ *api.GetMe_Request) (*api.GetMe_Response, error)
- func (s *Service) Login(ctx context.Context, _ *api.Login_Request) (*api.Login_Response, error)
- func (s *Service) SearchUser(ctx context.Context, req *api.SearchUser_Request) (*api.SearchUser_Response, error)
- func (s *Service) UpdateDeviceToken(ctx context.Context, req *api.UpdateDeviceToken_Request) (*api.UpdateDeviceToken_Response, error)
- func (s *Service) UpdateMe(ctx context.Context, req *api.UpdateMe_Request) (*api.UpdateMe_Response, error)
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GameService ¶ added in v0.2.0
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 (s *Service) CreateGame(ctx context.Context, req *api.CreateGame_Request) (*api.CreateGame_Response, error)
func (*Service) CreateGameV2 ¶ added in v0.3.20
func (s *Service) CreateGameV2(ctx context.Context, req *api.CreateGameV2_Request) (*api.CreateGameV2_Response, error)
func (*Service) GetEloLeaderboard ¶ added in v0.3.18
func (s *Service) GetEloLeaderboard(ctx context.Context, req *api.GetEloLeaderboard_Request) (*api.GetEloLeaderboard_Response, error)
func (*Service) GetGames ¶ added in v0.2.0
func (s *Service) GetGames(ctx context.Context, _ *api.GetGames_Request) (*api.GetGames_Response, error)
func (*Service) GetMe ¶ added in v0.0.4
func (s *Service) GetMe(ctx context.Context, _ *api.GetMe_Request) (*api.GetMe_Response, error)
func (*Service) Login ¶
func (s *Service) Login(ctx context.Context, _ *api.Login_Request) (*api.Login_Response, error)
func (*Service) SearchUser ¶ added in v0.1.0
func (s *Service) SearchUser(ctx context.Context, req *api.SearchUser_Request) (*api.SearchUser_Response, error)
func (*Service) UpdateDeviceToken ¶ added in v0.1.0
func (s *Service) UpdateDeviceToken(ctx context.Context, req *api.UpdateDeviceToken_Request) (*api.UpdateDeviceToken_Response, error)
func (*Service) UpdateMe ¶ added in v0.0.4
func (s *Service) UpdateMe(ctx context.Context, req *api.UpdateMe_Request) (*api.UpdateMe_Response, error)
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 }
Click to show internal directories.
Click to hide internal directories.