Documentation
¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- func GetRolesForBearerAuth(operation string) []string
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type AcceptEndGameConflict
- type AcceptEndGameForbidden
- type AcceptEndGameNoContent
- type AcceptEndGameNotFound
- type AcceptEndGameParams
- type AcceptEndGameRes
- type AcceptEndGameUnauthorized
- type Achievement
- func (s *Achievement) Decode(d *jx.Decoder) error
- func (s *Achievement) Encode(e *jx.Encoder)
- func (s *Achievement) GetDescription() OptString
- func (s *Achievement) GetID() OptAchievementID
- func (s *Achievement) GetName() OptString
- func (s *Achievement) GetUnlocked() OptBool
- func (s *Achievement) MarshalJSON() ([]byte, error)
- func (s *Achievement) SetDescription(val OptString)
- func (s *Achievement) SetID(val OptAchievementID)
- func (s *Achievement) SetName(val OptString)
- func (s *Achievement) SetUnlocked(val OptBool)
- func (s *Achievement) UnmarshalJSON(data []byte) error
- func (s *Achievement) Validate() error
- type AchievementID
- func (AchievementID) AllValues() []AchievementID
- func (s *AchievementID) Decode(d *jx.Decoder) error
- func (s AchievementID) Encode(e *jx.Encoder)
- func (s AchievementID) MarshalJSON() ([]byte, error)
- func (s AchievementID) MarshalText() ([]byte, error)
- func (s *AchievementID) UnmarshalJSON(data []byte) error
- func (s *AchievementID) UnmarshalText(data []byte) error
- func (s AchievementID) Validate() error
- type ActiveGame
- func (s *ActiveGame) Decode(d *jx.Decoder) error
- func (s *ActiveGame) Encode(e *jx.Encoder)
- func (s *ActiveGame) GetBoard() [][]string
- func (s *ActiveGame) GetCurrentTurnUID() OptUUID
- func (s *ActiveGame) GetGameID() OptUUID
- func (s *ActiveGame) GetGameToken() OptString
- func (s *ActiveGame) GetMoveNumber() OptInt
- func (s *ActiveGame) GetPlayers() []PlayerGameState
- func (s *ActiveGame) GetStatus() OptGameStatus
- func (s *ActiveGame) MarshalJSON() ([]byte, error)
- func (s *ActiveGame) SetBoard(val [][]string)
- func (s *ActiveGame) SetCurrentTurnUID(val OptUUID)
- func (s *ActiveGame) SetGameID(val OptUUID)
- func (s *ActiveGame) SetGameToken(val OptString)
- func (s *ActiveGame) SetMoveNumber(val OptInt)
- func (s *ActiveGame) SetPlayers(val []PlayerGameState)
- func (s *ActiveGame) SetStatus(val OptGameStatus)
- func (s *ActiveGame) UnmarshalJSON(data []byte) error
- func (s *ActiveGame) Validate() error
- type AuthRequest
- func (s *AuthRequest) Decode(d *jx.Decoder) error
- func (s *AuthRequest) Encode(e *jx.Encoder)
- func (s *AuthRequest) GetEmail() string
- func (s *AuthRequest) GetPassword() string
- func (s *AuthRequest) MarshalJSON() ([]byte, error)
- func (s *AuthRequest) SetEmail(val string)
- func (s *AuthRequest) SetPassword(val string)
- func (s *AuthRequest) UnmarshalJSON(data []byte) error
- type AuthRes
- type AuthResponse
- func (s *AuthResponse) Decode(d *jx.Decoder) error
- func (s *AuthResponse) Encode(e *jx.Encoder)
- func (s *AuthResponse) GetAccessToken() OptString
- func (s *AuthResponse) GetActiveGame() OptActiveGame
- func (s *AuthResponse) GetCentrifugoToken() OptString
- func (s *AuthResponse) GetExpiresIn() OptInt
- func (s *AuthResponse) GetLobbyToken() OptString
- func (s *AuthResponse) GetPlayer() OptPlayer
- func (s *AuthResponse) GetRefreshToken() OptString
- func (s *AuthResponse) GetTokenType() OptString
- func (s *AuthResponse) MarshalJSON() ([]byte, error)
- func (s *AuthResponse) SetAccessToken(val OptString)
- func (s *AuthResponse) SetActiveGame(val OptActiveGame)
- func (s *AuthResponse) SetCentrifugoToken(val OptString)
- func (s *AuthResponse) SetExpiresIn(val OptInt)
- func (s *AuthResponse) SetLobbyToken(val OptString)
- func (s *AuthResponse) SetPlayer(val OptPlayer)
- func (s *AuthResponse) SetRefreshToken(val OptString)
- func (s *AuthResponse) SetTokenType(val OptString)
- func (s *AuthResponse) UnmarshalJSON(data []byte) error
- func (s *AuthResponse) Validate() error
- type AuthTelegramInternalServerError
- type AuthTelegramRes
- type AuthTelegramServiceUnavailable
- type AuthTelegramUnauthorized
- type BearerAuth
- type BoardCell
- func (s *BoardCell) Decode(d *jx.Decoder) error
- func (s *BoardCell) Encode(e *jx.Encoder)
- func (s *BoardCell) GetCol() int
- func (s *BoardCell) GetRow() int
- func (s *BoardCell) MarshalJSON() ([]byte, error)
- func (s *BoardCell) SetCol(val int)
- func (s *BoardCell) SetRow(val int)
- func (s *BoardCell) UnmarshalJSON(data []byte) error
- func (s *BoardCell) Validate() error
- type Client
- func (c *Client) AcceptEndGame(ctx context.Context, params AcceptEndGameParams) (AcceptEndGameRes, error)
- func (c *Client) Auth(ctx context.Context, request *AuthRequest) (AuthRes, error)
- func (c *Client) AuthTelegram(ctx context.Context, request *TelegramAuthRequest) (AuthTelegramRes, error)
- func (c *Client) CreateGame(ctx context.Context) (CreateGameRes, error)
- func (c *Client) CreateGameWithBot(ctx context.Context) (CreateGameWithBotRes, error)
- func (c *Client) GetConfig(ctx context.Context) (*ConfigResponse, error)
- func (c *Client) GetLeaderboard(ctx context.Context, params GetLeaderboardParams) (GetLeaderboardRes, error)
- func (c *Client) GetPlayerAchievements(ctx context.Context) (GetPlayerAchievementsRes, error)
- func (c *Client) GetPlayerStateUID(ctx context.Context, params GetPlayerStateUIDParams) (GetPlayerStateUIDRes, error)
- func (c *Client) GetPlayerStats(ctx context.Context) (GetPlayerStatsRes, error)
- func (c *Client) JoinGame(ctx context.Context, params JoinGameParams) (JoinGameRes, error)
- func (c *Client) LeaveGame(ctx context.Context, params LeaveGameParams) (LeaveGameRes, error)
- func (c *Client) ListGames(ctx context.Context) (ListGamesRes, error)
- func (c *Client) Logout(ctx context.Context, request OptLogoutRequest) (LogoutRes, error)
- func (c *Client) MatchmakingJoin(ctx context.Context) (MatchmakingJoinRes, error)
- func (c *Client) MatchmakingLeave(ctx context.Context) (MatchmakingLeaveRes, error)
- func (c *Client) MoveGame(ctx context.Context, request *MoveRequest, params MoveGameParams) (MoveGameRes, error)
- func (c *Client) Ping(ctx context.Context, params PingParams) (PingRes, error)
- func (c *Client) ProposeEndGame(ctx context.Context, params ProposeEndGameParams) (ProposeEndGameRes, error)
- func (c *Client) RefreshToken(ctx context.Context, request *RefreshRequest) (RefreshTokenRes, error)
- func (c *Client) RejectEndGame(ctx context.Context, params RejectEndGameParams) (RejectEndGameRes, error)
- func (c *Client) Signup(ctx context.Context, request *SignupRequest) (SignupRes, error)
- func (c *Client) SkipGame(ctx context.Context, params SkipGameParams) (SkipGameRes, error)
- type ClientOption
- type ConfigResponse
- func (s *ConfigResponse) Decode(d *jx.Decoder) error
- func (s *ConfigResponse) Encode(e *jx.Encoder)
- func (s *ConfigResponse) GetEmailSignupEnabled() OptBool
- func (s *ConfigResponse) MarshalJSON() ([]byte, error)
- func (s *ConfigResponse) SetEmailSignupEnabled(val OptBool)
- func (s *ConfigResponse) UnmarshalJSON(data []byte) error
- type CreateGameRes
- type CreateGameResponse
- func (s *CreateGameResponse) Decode(d *jx.Decoder) error
- func (s *CreateGameResponse) Encode(e *jx.Encoder)
- func (s *CreateGameResponse) GetGame() OptGameSummary
- func (s *CreateGameResponse) GetGameToken() OptString
- func (s *CreateGameResponse) MarshalJSON() ([]byte, error)
- func (s *CreateGameResponse) SetGame(val OptGameSummary)
- func (s *CreateGameResponse) SetGameToken(val OptString)
- func (s *CreateGameResponse) UnmarshalJSON(data []byte) error
- func (s *CreateGameResponse) Validate() error
- type CreateGameWithBotConflict
- type CreateGameWithBotInternalServerError
- func (s *CreateGameWithBotInternalServerError) Decode(d *jx.Decoder) error
- func (s *CreateGameWithBotInternalServerError) Encode(e *jx.Encoder)
- func (s *CreateGameWithBotInternalServerError) MarshalJSON() ([]byte, error)
- func (s *CreateGameWithBotInternalServerError) UnmarshalJSON(data []byte) error
- type CreateGameWithBotRes
- type CreateGameWithBotUnauthorized
- type ErrorHandler
- type ErrorResponse
- func (s *ErrorResponse) Decode(d *jx.Decoder) error
- func (s *ErrorResponse) Encode(e *jx.Encoder)
- func (s *ErrorResponse) GetMessage() OptString
- func (s *ErrorResponse) GetStatus() OptInt
- func (s *ErrorResponse) GetType() OptString
- func (s *ErrorResponse) MarshalJSON() ([]byte, error)
- func (s *ErrorResponse) SetMessage(val OptString)
- func (s *ErrorResponse) SetStatus(val OptInt)
- func (s *ErrorResponse) SetType(val OptString)
- func (s *ErrorResponse) UnmarshalJSON(data []byte) error
- type GameStatus
- func (GameStatus) AllValues() []GameStatus
- func (s *GameStatus) Decode(d *jx.Decoder) error
- func (s GameStatus) Encode(e *jx.Encoder)
- func (s GameStatus) MarshalJSON() ([]byte, error)
- func (s GameStatus) MarshalText() ([]byte, error)
- func (s *GameStatus) UnmarshalJSON(data []byte) error
- func (s *GameStatus) UnmarshalText(data []byte) error
- func (s GameStatus) Validate() error
- type GameSummary
- func (s *GameSummary) Decode(d *jx.Decoder) error
- func (s *GameSummary) Encode(e *jx.Encoder)
- func (s *GameSummary) GetID() OptUUID
- func (s *GameSummary) GetPlayerIds() []uuid.UUID
- func (s *GameSummary) GetPlayers() []LobbyPlayer
- func (s *GameSummary) GetStartedAt() OptInt64
- func (s *GameSummary) GetStatus() OptGameStatus
- func (s *GameSummary) MarshalJSON() ([]byte, error)
- func (s *GameSummary) SetID(val OptUUID)
- func (s *GameSummary) SetPlayerIds(val []uuid.UUID)
- func (s *GameSummary) SetPlayers(val []LobbyPlayer)
- func (s *GameSummary) SetStartedAt(val OptInt64)
- func (s *GameSummary) SetStatus(val OptGameStatus)
- func (s *GameSummary) UnmarshalJSON(data []byte) error
- func (s *GameSummary) Validate() error
- type GetLeaderboardBadRequest
- type GetLeaderboardInternalServerError
- type GetLeaderboardParams
- type GetLeaderboardPeriod
- type GetLeaderboardRes
- type GetLeaderboardSort
- type GetPlayerAchievementsInternalServerError
- func (s *GetPlayerAchievementsInternalServerError) Decode(d *jx.Decoder) error
- func (s *GetPlayerAchievementsInternalServerError) Encode(e *jx.Encoder)
- func (s *GetPlayerAchievementsInternalServerError) MarshalJSON() ([]byte, error)
- func (s *GetPlayerAchievementsInternalServerError) UnmarshalJSON(data []byte) error
- type GetPlayerAchievementsRes
- type GetPlayerAchievementsUnauthorized
- type GetPlayerStateUIDBadRequest
- type GetPlayerStateUIDForbidden
- type GetPlayerStateUIDParams
- type GetPlayerStateUIDRes
- type GetPlayerStateUIDUnauthorized
- type GetPlayerStatsInternalServerError
- type GetPlayerStatsRes
- type GetPlayerStatsUnauthorized
- type Handler
- type Invoker
- type JoinGameConflict
- type JoinGameInternalServerError
- type JoinGameNotFound
- type JoinGameParams
- type JoinGameRes
- type JoinGameResponse
- func (s *JoinGameResponse) Decode(d *jx.Decoder) error
- func (s *JoinGameResponse) Encode(e *jx.Encoder)
- func (s *JoinGameResponse) GetBoard() [][]string
- func (s *JoinGameResponse) GetCurrentTurnUID() OptString
- func (s *JoinGameResponse) GetGame() OptGameSummary
- func (s *JoinGameResponse) GetGameToken() OptString
- func (s *JoinGameResponse) MarshalJSON() ([]byte, error)
- func (s *JoinGameResponse) SetBoard(val [][]string)
- func (s *JoinGameResponse) SetCurrentTurnUID(val OptString)
- func (s *JoinGameResponse) SetGame(val OptGameSummary)
- func (s *JoinGameResponse) SetGameToken(val OptString)
- func (s *JoinGameResponse) UnmarshalJSON(data []byte) error
- func (s *JoinGameResponse) Validate() error
- type JoinGameUnauthorized
- type Labeler
- type LeaderboardEntry
- func (s *LeaderboardEntry) Decode(d *jx.Decoder) error
- func (s *LeaderboardEntry) Encode(e *jx.Encoder)
- func (s *LeaderboardEntry) GetExp() OptInt64
- func (s *LeaderboardEntry) GetNickname() OptString
- func (s *LeaderboardEntry) GetRank() OptInt
- func (s *LeaderboardEntry) GetRating() OptInt64
- func (s *LeaderboardEntry) GetUID() OptUUID
- func (s *LeaderboardEntry) MarshalJSON() ([]byte, error)
- func (s *LeaderboardEntry) SetExp(val OptInt64)
- func (s *LeaderboardEntry) SetNickname(val OptString)
- func (s *LeaderboardEntry) SetRank(val OptInt)
- func (s *LeaderboardEntry) SetRating(val OptInt64)
- func (s *LeaderboardEntry) SetUID(val OptUUID)
- func (s *LeaderboardEntry) UnmarshalJSON(data []byte) error
- type LeaderboardResponse
- func (s *LeaderboardResponse) Decode(d *jx.Decoder) error
- func (s *LeaderboardResponse) Encode(e *jx.Encoder)
- func (s *LeaderboardResponse) GetGeneratedAt() OptInt64
- func (s *LeaderboardResponse) GetPeriod() OptLeaderboardResponsePeriod
- func (s *LeaderboardResponse) GetPlayers() []LeaderboardEntry
- func (s *LeaderboardResponse) GetSort() OptLeaderboardResponseSort
- func (s *LeaderboardResponse) MarshalJSON() ([]byte, error)
- func (s *LeaderboardResponse) SetGeneratedAt(val OptInt64)
- func (s *LeaderboardResponse) SetPeriod(val OptLeaderboardResponsePeriod)
- func (s *LeaderboardResponse) SetPlayers(val []LeaderboardEntry)
- func (s *LeaderboardResponse) SetSort(val OptLeaderboardResponseSort)
- func (s *LeaderboardResponse) UnmarshalJSON(data []byte) error
- func (s *LeaderboardResponse) Validate() error
- type LeaderboardResponsePeriod
- func (LeaderboardResponsePeriod) AllValues() []LeaderboardResponsePeriod
- func (s *LeaderboardResponsePeriod) Decode(d *jx.Decoder) error
- func (s LeaderboardResponsePeriod) Encode(e *jx.Encoder)
- func (s LeaderboardResponsePeriod) MarshalJSON() ([]byte, error)
- func (s LeaderboardResponsePeriod) MarshalText() ([]byte, error)
- func (s *LeaderboardResponsePeriod) UnmarshalJSON(data []byte) error
- func (s *LeaderboardResponsePeriod) UnmarshalText(data []byte) error
- func (s LeaderboardResponsePeriod) Validate() error
- type LeaderboardResponseSort
- func (LeaderboardResponseSort) AllValues() []LeaderboardResponseSort
- func (s *LeaderboardResponseSort) Decode(d *jx.Decoder) error
- func (s LeaderboardResponseSort) Encode(e *jx.Encoder)
- func (s LeaderboardResponseSort) MarshalJSON() ([]byte, error)
- func (s LeaderboardResponseSort) MarshalText() ([]byte, error)
- func (s *LeaderboardResponseSort) UnmarshalJSON(data []byte) error
- func (s *LeaderboardResponseSort) UnmarshalText(data []byte) error
- func (s LeaderboardResponseSort) Validate() error
- type LeaveGameConflict
- type LeaveGameForbidden
- type LeaveGameNoContent
- type LeaveGameNotFound
- type LeaveGameParams
- type LeaveGameRes
- type LeaveGameUnauthorized
- type ListGamesRes
- type ListGamesResponse
- func (s *ListGamesResponse) Decode(d *jx.Decoder) error
- func (s *ListGamesResponse) Encode(e *jx.Encoder)
- func (s *ListGamesResponse) GetGames() []GameSummary
- func (s *ListGamesResponse) MarshalJSON() ([]byte, error)
- func (s *ListGamesResponse) SetGames(val []GameSummary)
- func (s *ListGamesResponse) UnmarshalJSON(data []byte) error
- func (s *ListGamesResponse) Validate() error
- type LobbyPlayer
- func (s *LobbyPlayer) Decode(d *jx.Decoder) error
- func (s *LobbyPlayer) Encode(e *jx.Encoder)
- func (s *LobbyPlayer) GetExp() OptInt64
- func (s *LobbyPlayer) GetRating() OptInt64
- func (s *LobbyPlayer) GetUID() OptUUID
- func (s *LobbyPlayer) MarshalJSON() ([]byte, error)
- func (s *LobbyPlayer) SetExp(val OptInt64)
- func (s *LobbyPlayer) SetRating(val OptInt64)
- func (s *LobbyPlayer) SetUID(val OptUUID)
- func (s *LobbyPlayer) UnmarshalJSON(data []byte) error
- type LogoutNoContent
- type LogoutRequest
- func (s *LogoutRequest) Decode(d *jx.Decoder) error
- func (s *LogoutRequest) Encode(e *jx.Encoder)
- func (s *LogoutRequest) GetRefreshToken() OptString
- func (s *LogoutRequest) MarshalJSON() ([]byte, error)
- func (s *LogoutRequest) SetRefreshToken(val OptString)
- func (s *LogoutRequest) UnmarshalJSON(data []byte) error
- type LogoutRes
- type MatchmakingJoinConflict
- type MatchmakingJoinInternalServerError
- type MatchmakingJoinRes
- type MatchmakingJoinResponse
- func (s *MatchmakingJoinResponse) Decode(d *jx.Decoder) error
- func (s *MatchmakingJoinResponse) Encode(e *jx.Encoder)
- func (s *MatchmakingJoinResponse) GetStatus() OptMatchmakingJoinResponseStatus
- func (s *MatchmakingJoinResponse) MarshalJSON() ([]byte, error)
- func (s *MatchmakingJoinResponse) SetStatus(val OptMatchmakingJoinResponseStatus)
- func (s *MatchmakingJoinResponse) UnmarshalJSON(data []byte) error
- func (s *MatchmakingJoinResponse) Validate() error
- type MatchmakingJoinResponseStatus
- func (MatchmakingJoinResponseStatus) AllValues() []MatchmakingJoinResponseStatus
- func (s *MatchmakingJoinResponseStatus) Decode(d *jx.Decoder) error
- func (s MatchmakingJoinResponseStatus) Encode(e *jx.Encoder)
- func (s MatchmakingJoinResponseStatus) MarshalJSON() ([]byte, error)
- func (s MatchmakingJoinResponseStatus) MarshalText() ([]byte, error)
- func (s *MatchmakingJoinResponseStatus) UnmarshalJSON(data []byte) error
- func (s *MatchmakingJoinResponseStatus) UnmarshalText(data []byte) error
- func (s MatchmakingJoinResponseStatus) Validate() error
- type MatchmakingJoinUnauthorized
- type MatchmakingLeaveInternalServerError
- type MatchmakingLeaveNoContent
- type MatchmakingLeaveRes
- type MatchmakingLeaveUnauthorized
- type Middleware
- type MoveGameBadRequest
- type MoveGameConflict
- type MoveGameForbidden
- type MoveGameInternalServerError
- type MoveGameNotFound
- type MoveGameParams
- type MoveGameRes
- type MoveGameUnauthorized
- type MoveRequest
- func (s *MoveRequest) Decode(d *jx.Decoder) error
- func (s *MoveRequest) Encode(e *jx.Encoder)
- func (s *MoveRequest) GetNewLetter() MoveRequestNewLetter
- func (s *MoveRequest) GetWordPath() []BoardCell
- func (s *MoveRequest) MarshalJSON() ([]byte, error)
- func (s *MoveRequest) SetNewLetter(val MoveRequestNewLetter)
- func (s *MoveRequest) SetWordPath(val []BoardCell)
- func (s *MoveRequest) UnmarshalJSON(data []byte) error
- func (s *MoveRequest) Validate() error
- type MoveRequestNewLetter
- func (s *MoveRequestNewLetter) Decode(d *jx.Decoder) error
- func (s *MoveRequestNewLetter) Encode(e *jx.Encoder)
- func (s *MoveRequestNewLetter) GetChar() string
- func (s *MoveRequestNewLetter) GetCol() int
- func (s *MoveRequestNewLetter) GetRow() int
- func (s *MoveRequestNewLetter) MarshalJSON() ([]byte, error)
- func (s *MoveRequestNewLetter) SetChar(val string)
- func (s *MoveRequestNewLetter) SetCol(val int)
- func (s *MoveRequestNewLetter) SetRow(val int)
- func (s *MoveRequestNewLetter) UnmarshalJSON(data []byte) error
- func (s *MoveRequestNewLetter) Validate() error
- type MoveResponse
- func (s *MoveResponse) Decode(d *jx.Decoder) error
- func (s *MoveResponse) Encode(e *jx.Encoder)
- func (s *MoveResponse) GetBoard() [][]string
- func (s *MoveResponse) GetCurrentTurnUID() OptUUID
- func (s *MoveResponse) GetMoveNumber() OptInt
- func (s *MoveResponse) GetPlayers() []PlayerGameState
- func (s *MoveResponse) GetStatus() OptGameStatus
- func (s *MoveResponse) MarshalJSON() ([]byte, error)
- func (s *MoveResponse) SetBoard(val [][]string)
- func (s *MoveResponse) SetCurrentTurnUID(val OptUUID)
- func (s *MoveResponse) SetMoveNumber(val OptInt)
- func (s *MoveResponse) SetPlayers(val []PlayerGameState)
- func (s *MoveResponse) SetStatus(val OptGameStatus)
- func (s *MoveResponse) UnmarshalJSON(data []byte) error
- func (s *MoveResponse) Validate() error
- type OperationName
- type OptAchievementID
- func (o *OptAchievementID) Decode(d *jx.Decoder) error
- func (o OptAchievementID) Encode(e *jx.Encoder)
- func (o OptAchievementID) Get() (v AchievementID, ok bool)
- func (o OptAchievementID) IsSet() bool
- func (s OptAchievementID) MarshalJSON() ([]byte, error)
- func (o OptAchievementID) Or(d AchievementID) AchievementID
- func (o *OptAchievementID) Reset()
- func (o *OptAchievementID) SetTo(v AchievementID)
- func (s *OptAchievementID) UnmarshalJSON(data []byte) error
- type OptActiveGame
- func (o *OptActiveGame) Decode(d *jx.Decoder) error
- func (o OptActiveGame) Encode(e *jx.Encoder)
- func (o OptActiveGame) Get() (v ActiveGame, ok bool)
- func (o OptActiveGame) IsSet() bool
- func (s OptActiveGame) MarshalJSON() ([]byte, error)
- func (o OptActiveGame) Or(d ActiveGame) ActiveGame
- func (o *OptActiveGame) Reset()
- func (o *OptActiveGame) SetTo(v ActiveGame)
- func (s *OptActiveGame) UnmarshalJSON(data []byte) error
- type OptBool
- func (o *OptBool) Decode(d *jx.Decoder) error
- func (o OptBool) Encode(e *jx.Encoder)
- func (o OptBool) Get() (v bool, ok bool)
- func (o OptBool) IsSet() bool
- func (s OptBool) MarshalJSON() ([]byte, error)
- func (o OptBool) Or(d bool) bool
- func (o *OptBool) Reset()
- func (o *OptBool) SetTo(v bool)
- func (s *OptBool) UnmarshalJSON(data []byte) error
- type OptFloat64
- func (o *OptFloat64) Decode(d *jx.Decoder) error
- func (o OptFloat64) Encode(e *jx.Encoder)
- func (o OptFloat64) Get() (v float64, ok bool)
- func (o OptFloat64) IsSet() bool
- func (s OptFloat64) MarshalJSON() ([]byte, error)
- func (o OptFloat64) Or(d float64) float64
- func (o *OptFloat64) Reset()
- func (o *OptFloat64) SetTo(v float64)
- func (s *OptFloat64) UnmarshalJSON(data []byte) error
- type OptGameStatus
- func (o *OptGameStatus) Decode(d *jx.Decoder) error
- func (o OptGameStatus) Encode(e *jx.Encoder)
- func (o OptGameStatus) Get() (v GameStatus, ok bool)
- func (o OptGameStatus) IsSet() bool
- func (s OptGameStatus) MarshalJSON() ([]byte, error)
- func (o OptGameStatus) Or(d GameStatus) GameStatus
- func (o *OptGameStatus) Reset()
- func (o *OptGameStatus) SetTo(v GameStatus)
- func (s *OptGameStatus) UnmarshalJSON(data []byte) error
- type OptGameSummary
- func (o *OptGameSummary) Decode(d *jx.Decoder) error
- func (o OptGameSummary) Encode(e *jx.Encoder)
- func (o OptGameSummary) Get() (v GameSummary, ok bool)
- func (o OptGameSummary) IsSet() bool
- func (s OptGameSummary) MarshalJSON() ([]byte, error)
- func (o OptGameSummary) Or(d GameSummary) GameSummary
- func (o *OptGameSummary) Reset()
- func (o *OptGameSummary) SetTo(v GameSummary)
- func (s *OptGameSummary) UnmarshalJSON(data []byte) error
- type OptGetLeaderboardSort
- type OptInt
- func (o *OptInt) Decode(d *jx.Decoder) error
- func (o OptInt) Encode(e *jx.Encoder)
- func (o OptInt) Get() (v int, ok bool)
- func (o OptInt) IsSet() bool
- func (s OptInt) MarshalJSON() ([]byte, error)
- func (o OptInt) Or(d int) int
- func (o *OptInt) Reset()
- func (o *OptInt) SetTo(v int)
- func (s *OptInt) UnmarshalJSON(data []byte) error
- type OptInt64
- func (o *OptInt64) Decode(d *jx.Decoder) error
- func (o OptInt64) Encode(e *jx.Encoder)
- func (o OptInt64) Get() (v int64, ok bool)
- func (o OptInt64) IsSet() bool
- func (s OptInt64) MarshalJSON() ([]byte, error)
- func (o OptInt64) Or(d int64) int64
- func (o *OptInt64) Reset()
- func (o *OptInt64) SetTo(v int64)
- func (s *OptInt64) UnmarshalJSON(data []byte) error
- type OptLeaderboardResponsePeriod
- func (o *OptLeaderboardResponsePeriod) Decode(d *jx.Decoder) error
- func (o OptLeaderboardResponsePeriod) Encode(e *jx.Encoder)
- func (o OptLeaderboardResponsePeriod) Get() (v LeaderboardResponsePeriod, ok bool)
- func (o OptLeaderboardResponsePeriod) IsSet() bool
- func (s OptLeaderboardResponsePeriod) MarshalJSON() ([]byte, error)
- func (o OptLeaderboardResponsePeriod) Or(d LeaderboardResponsePeriod) LeaderboardResponsePeriod
- func (o *OptLeaderboardResponsePeriod) Reset()
- func (o *OptLeaderboardResponsePeriod) SetTo(v LeaderboardResponsePeriod)
- func (s *OptLeaderboardResponsePeriod) UnmarshalJSON(data []byte) error
- type OptLeaderboardResponseSort
- func (o *OptLeaderboardResponseSort) Decode(d *jx.Decoder) error
- func (o OptLeaderboardResponseSort) Encode(e *jx.Encoder)
- func (o OptLeaderboardResponseSort) Get() (v LeaderboardResponseSort, ok bool)
- func (o OptLeaderboardResponseSort) IsSet() bool
- func (s OptLeaderboardResponseSort) MarshalJSON() ([]byte, error)
- func (o OptLeaderboardResponseSort) Or(d LeaderboardResponseSort) LeaderboardResponseSort
- func (o *OptLeaderboardResponseSort) Reset()
- func (o *OptLeaderboardResponseSort) SetTo(v LeaderboardResponseSort)
- func (s *OptLeaderboardResponseSort) UnmarshalJSON(data []byte) error
- type OptLogoutRequest
- func (o *OptLogoutRequest) Decode(d *jx.Decoder) error
- func (o OptLogoutRequest) Encode(e *jx.Encoder)
- func (o OptLogoutRequest) Get() (v LogoutRequest, ok bool)
- func (o OptLogoutRequest) IsSet() bool
- func (s OptLogoutRequest) MarshalJSON() ([]byte, error)
- func (o OptLogoutRequest) Or(d LogoutRequest) LogoutRequest
- func (o *OptLogoutRequest) Reset()
- func (o *OptLogoutRequest) SetTo(v LogoutRequest)
- func (s *OptLogoutRequest) UnmarshalJSON(data []byte) error
- type OptMatchmakingJoinResponseStatus
- func (o *OptMatchmakingJoinResponseStatus) Decode(d *jx.Decoder) error
- func (o OptMatchmakingJoinResponseStatus) Encode(e *jx.Encoder)
- func (o OptMatchmakingJoinResponseStatus) Get() (v MatchmakingJoinResponseStatus, ok bool)
- func (o OptMatchmakingJoinResponseStatus) IsSet() bool
- func (s OptMatchmakingJoinResponseStatus) MarshalJSON() ([]byte, error)
- func (o OptMatchmakingJoinResponseStatus) Or(d MatchmakingJoinResponseStatus) MatchmakingJoinResponseStatus
- func (o *OptMatchmakingJoinResponseStatus) Reset()
- func (o *OptMatchmakingJoinResponseStatus) SetTo(v MatchmakingJoinResponseStatus)
- func (s *OptMatchmakingJoinResponseStatus) UnmarshalJSON(data []byte) error
- type OptPlayer
- func (o *OptPlayer) Decode(d *jx.Decoder) error
- func (o OptPlayer) Encode(e *jx.Encoder)
- func (o OptPlayer) Get() (v Player, ok bool)
- func (o OptPlayer) IsSet() bool
- func (s OptPlayer) MarshalJSON() ([]byte, error)
- func (o OptPlayer) Or(d Player) Player
- func (o *OptPlayer) Reset()
- func (o *OptPlayer) SetTo(v Player)
- func (s *OptPlayer) UnmarshalJSON(data []byte) error
- type OptString
- func (o *OptString) Decode(d *jx.Decoder) error
- func (o OptString) Encode(e *jx.Encoder)
- func (o OptString) Get() (v string, ok bool)
- func (o OptString) IsSet() bool
- func (s OptString) MarshalJSON() ([]byte, error)
- func (o OptString) Or(d string) string
- func (o *OptString) Reset()
- func (o *OptString) SetTo(v string)
- func (s *OptString) UnmarshalJSON(data []byte) error
- type OptUUID
- func (o *OptUUID) Decode(d *jx.Decoder) error
- func (o OptUUID) Encode(e *jx.Encoder)
- func (o OptUUID) Get() (v uuid.UUID, ok bool)
- func (o OptUUID) IsSet() bool
- func (s OptUUID) MarshalJSON() ([]byte, error)
- func (o OptUUID) Or(d uuid.UUID) uuid.UUID
- func (o *OptUUID) Reset()
- func (o *OptUUID) SetTo(v uuid.UUID)
- func (s *OptUUID) UnmarshalJSON(data []byte) error
- type Option
- type PingNoContent
- type PingParams
- type PingRes
- type Player
- func (s *Player) Decode(d *jx.Decoder) error
- func (s *Player) Encode(e *jx.Encoder)
- func (s *Player) GetExp() OptInt64
- func (s *Player) GetFirstname() OptString
- func (s *Player) GetLastname() OptString
- func (s *Player) GetRating() OptInt64
- func (s *Player) GetUID() OptUUID
- func (s *Player) MarshalJSON() ([]byte, error)
- func (s *Player) SetExp(val OptInt64)
- func (s *Player) SetFirstname(val OptString)
- func (s *Player) SetLastname(val OptString)
- func (s *Player) SetRating(val OptInt64)
- func (s *Player) SetUID(val OptUUID)
- func (s *Player) UnmarshalJSON(data []byte) error
- type PlayerAchievementsResponse
- func (s *PlayerAchievementsResponse) Decode(d *jx.Decoder) error
- func (s *PlayerAchievementsResponse) Encode(e *jx.Encoder)
- func (s *PlayerAchievementsResponse) GetAchievements() []Achievement
- func (s *PlayerAchievementsResponse) MarshalJSON() ([]byte, error)
- func (s *PlayerAchievementsResponse) SetAchievements(val []Achievement)
- func (s *PlayerAchievementsResponse) UnmarshalJSON(data []byte) error
- func (s *PlayerAchievementsResponse) Validate() error
- type PlayerGameState
- func (s *PlayerGameState) Decode(d *jx.Decoder) error
- func (s *PlayerGameState) Encode(e *jx.Encoder)
- func (s *PlayerGameState) GetExp() OptInt64
- func (s *PlayerGameState) GetExpGained() OptInt
- func (s *PlayerGameState) GetRating() OptInt64
- func (s *PlayerGameState) GetScore() OptInt
- func (s *PlayerGameState) GetUID() OptUUID
- func (s *PlayerGameState) GetWords() []string
- func (s *PlayerGameState) GetWordsCount() OptInt
- func (s *PlayerGameState) MarshalJSON() ([]byte, error)
- func (s *PlayerGameState) SetExp(val OptInt64)
- func (s *PlayerGameState) SetExpGained(val OptInt)
- func (s *PlayerGameState) SetRating(val OptInt64)
- func (s *PlayerGameState) SetScore(val OptInt)
- func (s *PlayerGameState) SetUID(val OptUUID)
- func (s *PlayerGameState) SetWords(val []string)
- func (s *PlayerGameState) SetWordsCount(val OptInt)
- func (s *PlayerGameState) UnmarshalJSON(data []byte) error
- type PlayerState
- func (s *PlayerState) Decode(d *jx.Decoder) error
- func (s *PlayerState) Encode(e *jx.Encoder)
- func (s *PlayerState) GetExp() OptInt64
- func (s *PlayerState) GetFlags() OptInt64
- func (s *PlayerState) GetGameID() OptUUID
- func (s *PlayerState) GetLives() OptInt64
- func (s *PlayerState) GetNickname() OptString
- func (s *PlayerState) GetRating() OptInt64
- func (s *PlayerState) GetUID() OptUUID
- func (s *PlayerState) MarshalJSON() ([]byte, error)
- func (s *PlayerState) SetExp(val OptInt64)
- func (s *PlayerState) SetFlags(val OptInt64)
- func (s *PlayerState) SetGameID(val OptUUID)
- func (s *PlayerState) SetLives(val OptInt64)
- func (s *PlayerState) SetNickname(val OptString)
- func (s *PlayerState) SetRating(val OptInt64)
- func (s *PlayerState) SetUID(val OptUUID)
- func (s *PlayerState) UnmarshalJSON(data []byte) error
- type PlayerStatsResponse
- func (s *PlayerStatsResponse) Decode(d *jx.Decoder) error
- func (s *PlayerStatsResponse) Encode(e *jx.Encoder)
- func (s *PlayerStatsResponse) GetAvgWordLength() OptFloat64
- func (s *PlayerStatsResponse) GetBestWord() OptString
- func (s *PlayerStatsResponse) GetDraws() OptInt64
- func (s *PlayerStatsResponse) GetFavoriteLetter() OptString
- func (s *PlayerStatsResponse) GetGamesPlayed() OptInt64
- func (s *PlayerStatsResponse) GetLosses() OptInt64
- func (s *PlayerStatsResponse) GetWinRate() OptFloat64
- func (s *PlayerStatsResponse) GetWins() OptInt64
- func (s *PlayerStatsResponse) MarshalJSON() ([]byte, error)
- func (s *PlayerStatsResponse) SetAvgWordLength(val OptFloat64)
- func (s *PlayerStatsResponse) SetBestWord(val OptString)
- func (s *PlayerStatsResponse) SetDraws(val OptInt64)
- func (s *PlayerStatsResponse) SetFavoriteLetter(val OptString)
- func (s *PlayerStatsResponse) SetGamesPlayed(val OptInt64)
- func (s *PlayerStatsResponse) SetLosses(val OptInt64)
- func (s *PlayerStatsResponse) SetWinRate(val OptFloat64)
- func (s *PlayerStatsResponse) SetWins(val OptInt64)
- func (s *PlayerStatsResponse) UnmarshalJSON(data []byte) error
- func (s *PlayerStatsResponse) Validate() error
- type ProposeEndGameConflict
- type ProposeEndGameForbidden
- type ProposeEndGameNoContent
- type ProposeEndGameNotFound
- type ProposeEndGameParams
- type ProposeEndGameRes
- type ProposeEndGameUnauthorized
- type RefreshRequest
- func (s *RefreshRequest) Decode(d *jx.Decoder) error
- func (s *RefreshRequest) Encode(e *jx.Encoder)
- func (s *RefreshRequest) GetRefreshToken() string
- func (s *RefreshRequest) MarshalJSON() ([]byte, error)
- func (s *RefreshRequest) SetRefreshToken(val string)
- func (s *RefreshRequest) UnmarshalJSON(data []byte) error
- type RefreshResponse
- func (s *RefreshResponse) Decode(d *jx.Decoder) error
- func (s *RefreshResponse) Encode(e *jx.Encoder)
- func (s *RefreshResponse) GetAccessToken() OptString
- func (s *RefreshResponse) GetExpiresIn() OptInt
- func (s *RefreshResponse) GetRefreshToken() OptString
- func (s *RefreshResponse) GetTokenType() OptString
- func (s *RefreshResponse) MarshalJSON() ([]byte, error)
- func (s *RefreshResponse) SetAccessToken(val OptString)
- func (s *RefreshResponse) SetExpiresIn(val OptInt)
- func (s *RefreshResponse) SetRefreshToken(val OptString)
- func (s *RefreshResponse) SetTokenType(val OptString)
- func (s *RefreshResponse) UnmarshalJSON(data []byte) error
- type RefreshTokenRes
- type RejectEndGameConflict
- type RejectEndGameForbidden
- type RejectEndGameNoContent
- type RejectEndGameNotFound
- type RejectEndGameParams
- type RejectEndGameRes
- type RejectEndGameUnauthorized
- type Route
- type SecurityHandler
- type SecuritySource
- type Server
- type ServerOption
- func WithErrorHandler(h ErrorHandler) ServerOption
- func WithMaxMultipartMemory(max int64) ServerOption
- func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
- func WithMiddleware(m ...Middleware) ServerOption
- func WithNotFound(notFound http.HandlerFunc) ServerOption
- func WithPathPrefix(prefix string) ServerOption
- type SignupRequest
- func (s *SignupRequest) Decode(d *jx.Decoder) error
- func (s *SignupRequest) Encode(e *jx.Encoder)
- func (s *SignupRequest) GetEmail() string
- func (s *SignupRequest) GetFirstname() string
- func (s *SignupRequest) GetLastname() string
- func (s *SignupRequest) GetPassword() string
- func (s *SignupRequest) MarshalJSON() ([]byte, error)
- func (s *SignupRequest) SetEmail(val string)
- func (s *SignupRequest) SetFirstname(val string)
- func (s *SignupRequest) SetLastname(val string)
- func (s *SignupRequest) SetPassword(val string)
- func (s *SignupRequest) UnmarshalJSON(data []byte) error
- func (s *SignupRequest) Validate() error
- type SignupRes
- type SignupResponse
- func (s *SignupResponse) Decode(d *jx.Decoder) error
- func (s *SignupResponse) Encode(e *jx.Encoder)
- func (s *SignupResponse) GetAccessToken() OptString
- func (s *SignupResponse) GetCentrifugoToken() OptString
- func (s *SignupResponse) GetExpiresIn() OptInt
- func (s *SignupResponse) GetLobbyToken() OptString
- func (s *SignupResponse) GetRefreshToken() OptString
- func (s *SignupResponse) GetTokenType() OptString
- func (s *SignupResponse) GetUser() OptPlayer
- func (s *SignupResponse) MarshalJSON() ([]byte, error)
- func (s *SignupResponse) SetAccessToken(val OptString)
- func (s *SignupResponse) SetCentrifugoToken(val OptString)
- func (s *SignupResponse) SetExpiresIn(val OptInt)
- func (s *SignupResponse) SetLobbyToken(val OptString)
- func (s *SignupResponse) SetRefreshToken(val OptString)
- func (s *SignupResponse) SetTokenType(val OptString)
- func (s *SignupResponse) SetUser(val OptPlayer)
- func (s *SignupResponse) UnmarshalJSON(data []byte) error
- type SkipGameConflict
- type SkipGameForbidden
- type SkipGameNoContent
- type SkipGameNotFound
- type SkipGameParams
- type SkipGameRes
- type SkipGameUnauthorized
- type TelegramAuthRequest
- func (s *TelegramAuthRequest) Decode(d *jx.Decoder) error
- func (s *TelegramAuthRequest) Encode(e *jx.Encoder)
- func (s *TelegramAuthRequest) GetInitData() string
- func (s *TelegramAuthRequest) MarshalJSON() ([]byte, error)
- func (s *TelegramAuthRequest) SetInitData(val string)
- func (s *TelegramAuthRequest) UnmarshalJSON(data []byte) error
- type UnimplementedHandler
- func (UnimplementedHandler) AcceptEndGame(ctx context.Context, params AcceptEndGameParams) (r AcceptEndGameRes, _ error)
- func (UnimplementedHandler) Auth(ctx context.Context, req *AuthRequest) (r AuthRes, _ error)
- func (UnimplementedHandler) AuthTelegram(ctx context.Context, req *TelegramAuthRequest) (r AuthTelegramRes, _ error)
- func (UnimplementedHandler) CreateGame(ctx context.Context) (r CreateGameRes, _ error)
- func (UnimplementedHandler) CreateGameWithBot(ctx context.Context) (r CreateGameWithBotRes, _ error)
- func (UnimplementedHandler) GetConfig(ctx context.Context) (r *ConfigResponse, _ error)
- func (UnimplementedHandler) GetLeaderboard(ctx context.Context, params GetLeaderboardParams) (r GetLeaderboardRes, _ error)
- func (UnimplementedHandler) GetPlayerAchievements(ctx context.Context) (r GetPlayerAchievementsRes, _ error)
- func (UnimplementedHandler) GetPlayerStateUID(ctx context.Context, params GetPlayerStateUIDParams) (r GetPlayerStateUIDRes, _ error)
- func (UnimplementedHandler) GetPlayerStats(ctx context.Context) (r GetPlayerStatsRes, _ error)
- func (UnimplementedHandler) JoinGame(ctx context.Context, params JoinGameParams) (r JoinGameRes, _ error)
- func (UnimplementedHandler) LeaveGame(ctx context.Context, params LeaveGameParams) (r LeaveGameRes, _ error)
- func (UnimplementedHandler) ListGames(ctx context.Context) (r ListGamesRes, _ error)
- func (UnimplementedHandler) Logout(ctx context.Context, req OptLogoutRequest) (r LogoutRes, _ error)
- func (UnimplementedHandler) MatchmakingJoin(ctx context.Context) (r MatchmakingJoinRes, _ error)
- func (UnimplementedHandler) MatchmakingLeave(ctx context.Context) (r MatchmakingLeaveRes, _ error)
- func (UnimplementedHandler) MoveGame(ctx context.Context, req *MoveRequest, params MoveGameParams) (r MoveGameRes, _ error)
- func (UnimplementedHandler) Ping(ctx context.Context, params PingParams) (r PingRes, _ error)
- func (UnimplementedHandler) ProposeEndGame(ctx context.Context, params ProposeEndGameParams) (r ProposeEndGameRes, _ error)
- func (UnimplementedHandler) RefreshToken(ctx context.Context, req *RefreshRequest) (r RefreshTokenRes, _ error)
- func (UnimplementedHandler) RejectEndGame(ctx context.Context, params RejectEndGameParams) (r RejectEndGameRes, _ error)
- func (UnimplementedHandler) Signup(ctx context.Context, req *SignupRequest) (r SignupRes, _ error)
- func (UnimplementedHandler) SkipGame(ctx context.Context, params SkipGameParams) (r SkipGameRes, _ error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRolesForBearerAuth ¶
GetRolesForBearerAuth returns the required roles for the given operation.
This is useful for authorization scenarios where you need to know which roles are required for an operation.
Example:
requiredRoles := GetRolesForBearerAuth(AddPetOperation)
Returns nil if the operation has no role requirements or if the operation is unknown.
Types ¶
type AcceptEndGameConflict ¶
type AcceptEndGameConflict ErrorResponse
func (*AcceptEndGameConflict) Decode ¶
func (s *AcceptEndGameConflict) Decode(d *jx.Decoder) error
Decode decodes AcceptEndGameConflict from json.
func (*AcceptEndGameConflict) Encode ¶
func (s *AcceptEndGameConflict) Encode(e *jx.Encoder)
Encode encodes AcceptEndGameConflict as json.
func (*AcceptEndGameConflict) MarshalJSON ¶
func (s *AcceptEndGameConflict) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AcceptEndGameConflict) UnmarshalJSON ¶
func (s *AcceptEndGameConflict) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type AcceptEndGameForbidden ¶
type AcceptEndGameForbidden ErrorResponse
func (*AcceptEndGameForbidden) Decode ¶
func (s *AcceptEndGameForbidden) Decode(d *jx.Decoder) error
Decode decodes AcceptEndGameForbidden from json.
func (*AcceptEndGameForbidden) Encode ¶
func (s *AcceptEndGameForbidden) Encode(e *jx.Encoder)
Encode encodes AcceptEndGameForbidden as json.
func (*AcceptEndGameForbidden) MarshalJSON ¶
func (s *AcceptEndGameForbidden) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AcceptEndGameForbidden) UnmarshalJSON ¶
func (s *AcceptEndGameForbidden) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type AcceptEndGameNoContent ¶
type AcceptEndGameNoContent struct{}
AcceptEndGameNoContent is response for AcceptEndGame operation.
type AcceptEndGameNotFound ¶
type AcceptEndGameNotFound ErrorResponse
func (*AcceptEndGameNotFound) Decode ¶
func (s *AcceptEndGameNotFound) Decode(d *jx.Decoder) error
Decode decodes AcceptEndGameNotFound from json.
func (*AcceptEndGameNotFound) Encode ¶
func (s *AcceptEndGameNotFound) Encode(e *jx.Encoder)
Encode encodes AcceptEndGameNotFound as json.
func (*AcceptEndGameNotFound) MarshalJSON ¶
func (s *AcceptEndGameNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AcceptEndGameNotFound) UnmarshalJSON ¶
func (s *AcceptEndGameNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type AcceptEndGameParams ¶
AcceptEndGameParams is parameters of acceptEndGame operation.
type AcceptEndGameRes ¶
type AcceptEndGameRes interface {
// contains filtered or unexported methods
}
type AcceptEndGameUnauthorized ¶
type AcceptEndGameUnauthorized ErrorResponse
func (*AcceptEndGameUnauthorized) Decode ¶
func (s *AcceptEndGameUnauthorized) Decode(d *jx.Decoder) error
Decode decodes AcceptEndGameUnauthorized from json.
func (*AcceptEndGameUnauthorized) Encode ¶
func (s *AcceptEndGameUnauthorized) Encode(e *jx.Encoder)
Encode encodes AcceptEndGameUnauthorized as json.
func (*AcceptEndGameUnauthorized) MarshalJSON ¶
func (s *AcceptEndGameUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AcceptEndGameUnauthorized) UnmarshalJSON ¶
func (s *AcceptEndGameUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type Achievement ¶
type Achievement struct {
// Achievement identifier.
ID OptAchievementID `json:"id"`
// Achievement display name.
Name OptString `json:"name"`
// Achievement description.
Description OptString `json:"description"`
// Whether the achievement has been unlocked.
Unlocked OptBool `json:"unlocked"`
}
Ref: #/components/schemas/Achievement
func (*Achievement) Decode ¶
func (s *Achievement) Decode(d *jx.Decoder) error
Decode decodes Achievement from json.
func (*Achievement) Encode ¶
func (s *Achievement) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*Achievement) GetDescription ¶
func (s *Achievement) GetDescription() OptString
GetDescription returns the value of Description.
func (*Achievement) GetID ¶
func (s *Achievement) GetID() OptAchievementID
GetID returns the value of ID.
func (*Achievement) GetName ¶
func (s *Achievement) GetName() OptString
GetName returns the value of Name.
func (*Achievement) GetUnlocked ¶
func (s *Achievement) GetUnlocked() OptBool
GetUnlocked returns the value of Unlocked.
func (*Achievement) MarshalJSON ¶
func (s *Achievement) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*Achievement) SetDescription ¶
func (s *Achievement) SetDescription(val OptString)
SetDescription sets the value of Description.
func (*Achievement) SetID ¶
func (s *Achievement) SetID(val OptAchievementID)
SetID sets the value of ID.
func (*Achievement) SetName ¶
func (s *Achievement) SetName(val OptString)
SetName sets the value of Name.
func (*Achievement) SetUnlocked ¶
func (s *Achievement) SetUnlocked(val OptBool)
SetUnlocked sets the value of Unlocked.
func (*Achievement) UnmarshalJSON ¶
func (s *Achievement) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*Achievement) Validate ¶
func (s *Achievement) Validate() error
type AchievementID ¶
type AchievementID string
Achievement identifier.
const ( AchievementIDFirstGame AchievementID = "first_game" AchievementIDFirstWin AchievementID = "first_win" AchievementIDHighScorer50 AchievementID = "high_scorer_50" AchievementIDWordsmith10 AchievementID = "wordsmith_10" AchievementIDGiantWord AchievementID = "giant_word" AchievementIDWinningStreak3 AchievementID = "winning_streak_3" AchievementIDVeteran10 AchievementID = "veteran_10" )
func (AchievementID) AllValues ¶
func (AchievementID) AllValues() []AchievementID
AllValues returns all AchievementID values.
func (*AchievementID) Decode ¶
func (s *AchievementID) Decode(d *jx.Decoder) error
Decode decodes AchievementID from json.
func (AchievementID) Encode ¶
func (s AchievementID) Encode(e *jx.Encoder)
Encode encodes AchievementID as json.
func (AchievementID) MarshalJSON ¶
func (s AchievementID) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (AchievementID) MarshalText ¶
func (s AchievementID) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*AchievementID) UnmarshalJSON ¶
func (s *AchievementID) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*AchievementID) UnmarshalText ¶
func (s *AchievementID) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (AchievementID) Validate ¶
func (s AchievementID) Validate() error
type ActiveGame ¶
type ActiveGame struct {
// ID of the active game.
GameID OptUUID `json:"game_id"`
// Centrifugo subscription JWT for the game channel.
GameToken OptString `json:"game_token"`
// Current 5x5 board state.
Board [][]string `json:"board"`
// ID of the player whose turn it is.
CurrentTurnUID OptUUID `json:"current_turn_uid"`
MoveNumber OptInt `json:"move_number"`
Status OptGameStatus `json:"status"`
Players []PlayerGameState `json:"players"`
}
Ref: #/components/schemas/ActiveGame
func (*ActiveGame) Decode ¶
func (s *ActiveGame) Decode(d *jx.Decoder) error
Decode decodes ActiveGame from json.
func (*ActiveGame) Encode ¶
func (s *ActiveGame) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ActiveGame) GetBoard ¶
func (s *ActiveGame) GetBoard() [][]string
GetBoard returns the value of Board.
func (*ActiveGame) GetCurrentTurnUID ¶
func (s *ActiveGame) GetCurrentTurnUID() OptUUID
GetCurrentTurnUID returns the value of CurrentTurnUID.
func (*ActiveGame) GetGameID ¶
func (s *ActiveGame) GetGameID() OptUUID
GetGameID returns the value of GameID.
func (*ActiveGame) GetGameToken ¶
func (s *ActiveGame) GetGameToken() OptString
GetGameToken returns the value of GameToken.
func (*ActiveGame) GetMoveNumber ¶
func (s *ActiveGame) GetMoveNumber() OptInt
GetMoveNumber returns the value of MoveNumber.
func (*ActiveGame) GetPlayers ¶
func (s *ActiveGame) GetPlayers() []PlayerGameState
GetPlayers returns the value of Players.
func (*ActiveGame) GetStatus ¶
func (s *ActiveGame) GetStatus() OptGameStatus
GetStatus returns the value of Status.
func (*ActiveGame) MarshalJSON ¶
func (s *ActiveGame) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ActiveGame) SetBoard ¶
func (s *ActiveGame) SetBoard(val [][]string)
SetBoard sets the value of Board.
func (*ActiveGame) SetCurrentTurnUID ¶
func (s *ActiveGame) SetCurrentTurnUID(val OptUUID)
SetCurrentTurnUID sets the value of CurrentTurnUID.
func (*ActiveGame) SetGameID ¶
func (s *ActiveGame) SetGameID(val OptUUID)
SetGameID sets the value of GameID.
func (*ActiveGame) SetGameToken ¶
func (s *ActiveGame) SetGameToken(val OptString)
SetGameToken sets the value of GameToken.
func (*ActiveGame) SetMoveNumber ¶
func (s *ActiveGame) SetMoveNumber(val OptInt)
SetMoveNumber sets the value of MoveNumber.
func (*ActiveGame) SetPlayers ¶
func (s *ActiveGame) SetPlayers(val []PlayerGameState)
SetPlayers sets the value of Players.
func (*ActiveGame) SetStatus ¶
func (s *ActiveGame) SetStatus(val OptGameStatus)
SetStatus sets the value of Status.
func (*ActiveGame) UnmarshalJSON ¶
func (s *ActiveGame) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ActiveGame) Validate ¶
func (s *ActiveGame) Validate() error
type AuthRequest ¶
type AuthRequest struct {
// User's email.
Email string `json:"email"`
// User's password.
Password string `json:"password"`
}
Ref: #/components/schemas/AuthRequest
func (*AuthRequest) Decode ¶
func (s *AuthRequest) Decode(d *jx.Decoder) error
Decode decodes AuthRequest from json.
func (*AuthRequest) Encode ¶
func (s *AuthRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*AuthRequest) GetEmail ¶
func (s *AuthRequest) GetEmail() string
GetEmail returns the value of Email.
func (*AuthRequest) GetPassword ¶
func (s *AuthRequest) GetPassword() string
GetPassword returns the value of Password.
func (*AuthRequest) MarshalJSON ¶
func (s *AuthRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AuthRequest) SetEmail ¶
func (s *AuthRequest) SetEmail(val string)
SetEmail sets the value of Email.
func (*AuthRequest) SetPassword ¶
func (s *AuthRequest) SetPassword(val string)
SetPassword sets the value of Password.
func (*AuthRequest) UnmarshalJSON ¶
func (s *AuthRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type AuthResponse ¶
type AuthResponse struct {
Player OptPlayer `json:"player"`
// Short-lived JWT access token (Authorization: Bearer).
AccessToken OptString `json:"access_token"`
// Opaque long-lived token used to obtain a new access token.
RefreshToken OptString `json:"refresh_token"`
// Always "Bearer".
TokenType OptString `json:"token_type"`
// Access token lifetime in seconds.
ExpiresIn OptInt `json:"expires_in"`
// JWT for connecting to the Centrifugo WebSocket.
CentrifugoToken OptString `json:"centrifugo_token"`
// Centrifugo subscription JWT for the lobby channel.
LobbyToken OptString `json:"lobby_token"`
// Present when the player is currently in an active game. Use this to reconnect after a disconnect.
ActiveGame OptActiveGame `json:"active_game"`
}
Ref: #/components/schemas/AuthResponse
func (*AuthResponse) Decode ¶
func (s *AuthResponse) Decode(d *jx.Decoder) error
Decode decodes AuthResponse from json.
func (*AuthResponse) Encode ¶
func (s *AuthResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*AuthResponse) GetAccessToken ¶
func (s *AuthResponse) GetAccessToken() OptString
GetAccessToken returns the value of AccessToken.
func (*AuthResponse) GetActiveGame ¶
func (s *AuthResponse) GetActiveGame() OptActiveGame
GetActiveGame returns the value of ActiveGame.
func (*AuthResponse) GetCentrifugoToken ¶
func (s *AuthResponse) GetCentrifugoToken() OptString
GetCentrifugoToken returns the value of CentrifugoToken.
func (*AuthResponse) GetExpiresIn ¶
func (s *AuthResponse) GetExpiresIn() OptInt
GetExpiresIn returns the value of ExpiresIn.
func (*AuthResponse) GetLobbyToken ¶
func (s *AuthResponse) GetLobbyToken() OptString
GetLobbyToken returns the value of LobbyToken.
func (*AuthResponse) GetPlayer ¶
func (s *AuthResponse) GetPlayer() OptPlayer
GetPlayer returns the value of Player.
func (*AuthResponse) GetRefreshToken ¶
func (s *AuthResponse) GetRefreshToken() OptString
GetRefreshToken returns the value of RefreshToken.
func (*AuthResponse) GetTokenType ¶
func (s *AuthResponse) GetTokenType() OptString
GetTokenType returns the value of TokenType.
func (*AuthResponse) MarshalJSON ¶
func (s *AuthResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AuthResponse) SetAccessToken ¶
func (s *AuthResponse) SetAccessToken(val OptString)
SetAccessToken sets the value of AccessToken.
func (*AuthResponse) SetActiveGame ¶
func (s *AuthResponse) SetActiveGame(val OptActiveGame)
SetActiveGame sets the value of ActiveGame.
func (*AuthResponse) SetCentrifugoToken ¶
func (s *AuthResponse) SetCentrifugoToken(val OptString)
SetCentrifugoToken sets the value of CentrifugoToken.
func (*AuthResponse) SetExpiresIn ¶
func (s *AuthResponse) SetExpiresIn(val OptInt)
SetExpiresIn sets the value of ExpiresIn.
func (*AuthResponse) SetLobbyToken ¶
func (s *AuthResponse) SetLobbyToken(val OptString)
SetLobbyToken sets the value of LobbyToken.
func (*AuthResponse) SetPlayer ¶
func (s *AuthResponse) SetPlayer(val OptPlayer)
SetPlayer sets the value of Player.
func (*AuthResponse) SetRefreshToken ¶
func (s *AuthResponse) SetRefreshToken(val OptString)
SetRefreshToken sets the value of RefreshToken.
func (*AuthResponse) SetTokenType ¶
func (s *AuthResponse) SetTokenType(val OptString)
SetTokenType sets the value of TokenType.
func (*AuthResponse) UnmarshalJSON ¶
func (s *AuthResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*AuthResponse) Validate ¶
func (s *AuthResponse) Validate() error
type AuthTelegramInternalServerError ¶
type AuthTelegramInternalServerError ErrorResponse
func (*AuthTelegramInternalServerError) Decode ¶
func (s *AuthTelegramInternalServerError) Decode(d *jx.Decoder) error
Decode decodes AuthTelegramInternalServerError from json.
func (*AuthTelegramInternalServerError) Encode ¶
func (s *AuthTelegramInternalServerError) Encode(e *jx.Encoder)
Encode encodes AuthTelegramInternalServerError as json.
func (*AuthTelegramInternalServerError) MarshalJSON ¶
func (s *AuthTelegramInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AuthTelegramInternalServerError) UnmarshalJSON ¶
func (s *AuthTelegramInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type AuthTelegramRes ¶
type AuthTelegramRes interface {
// contains filtered or unexported methods
}
type AuthTelegramServiceUnavailable ¶
type AuthTelegramServiceUnavailable ErrorResponse
func (*AuthTelegramServiceUnavailable) Decode ¶
func (s *AuthTelegramServiceUnavailable) Decode(d *jx.Decoder) error
Decode decodes AuthTelegramServiceUnavailable from json.
func (*AuthTelegramServiceUnavailable) Encode ¶
func (s *AuthTelegramServiceUnavailable) Encode(e *jx.Encoder)
Encode encodes AuthTelegramServiceUnavailable as json.
func (*AuthTelegramServiceUnavailable) MarshalJSON ¶
func (s *AuthTelegramServiceUnavailable) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AuthTelegramServiceUnavailable) UnmarshalJSON ¶
func (s *AuthTelegramServiceUnavailable) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type AuthTelegramUnauthorized ¶
type AuthTelegramUnauthorized ErrorResponse
func (*AuthTelegramUnauthorized) Decode ¶
func (s *AuthTelegramUnauthorized) Decode(d *jx.Decoder) error
Decode decodes AuthTelegramUnauthorized from json.
func (*AuthTelegramUnauthorized) Encode ¶
func (s *AuthTelegramUnauthorized) Encode(e *jx.Encoder)
Encode encodes AuthTelegramUnauthorized as json.
func (*AuthTelegramUnauthorized) MarshalJSON ¶
func (s *AuthTelegramUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AuthTelegramUnauthorized) UnmarshalJSON ¶
func (s *AuthTelegramUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type BearerAuth ¶
func (*BearerAuth) GetRoles ¶
func (s *BearerAuth) GetRoles() []string
GetRoles returns the value of Roles.
func (*BearerAuth) GetToken ¶
func (s *BearerAuth) GetToken() string
GetToken returns the value of Token.
func (*BearerAuth) SetRoles ¶
func (s *BearerAuth) SetRoles(val []string)
SetRoles sets the value of Roles.
func (*BearerAuth) SetToken ¶
func (s *BearerAuth) SetToken(val string)
SetToken sets the value of Token.
type BoardCell ¶
A cell position on the 5×5 board, used in word_path. The character at each cell is resolved server-side from the current board state; clients do not need to send it. The new letter being placed is provided separately in new_letter.char. Ref: #/components/schemas/BoardCell
func (*BoardCell) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*BoardCell) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func (*Client) AcceptEndGame ¶
func (c *Client) AcceptEndGame(ctx context.Context, params AcceptEndGameParams) (AcceptEndGameRes, error)
AcceptEndGame invokes acceptEndGame operation.
The opponent accepts the end-game proposal. The game ends immediately with the current scores. Only the non-proposing player may call this.
POST /games/{id}/accept-end
func (*Client) AuthTelegram ¶
func (c *Client) AuthTelegram(ctx context.Context, request *TelegramAuthRequest) (AuthTelegramRes, error)
AuthTelegram invokes authTelegram operation.
Validates the signed init data produced by the Telegram WebView against the bot token, then logs in an existing user or creates a new one linked to their Telegram account.
POST /auth/telegram
func (*Client) CreateGame ¶
func (c *Client) CreateGame(ctx context.Context) (CreateGameRes, error)
CreateGame invokes createGame operation.
Create a new game.
POST /games
func (*Client) CreateGameWithBot ¶
func (c *Client) CreateGameWithBot(ctx context.Context) (CreateGameWithBotRes, error)
CreateGameWithBot invokes createGameWithBot operation.
Creates a new game where the authenticated player plays against a server-side bot. The game starts immediately and the first move belongs to the human player.
POST /games/with-bot
func (*Client) GetConfig ¶
func (c *Client) GetConfig(ctx context.Context) (*ConfigResponse, error)
GetConfig invokes getConfig operation.
Returns feature flags the client needs before authentication, e.g. whether email/password registration is available.
GET /config
func (*Client) GetLeaderboard ¶
func (c *Client) GetLeaderboard(ctx context.Context, params GetLeaderboardParams) (GetLeaderboardRes, error)
GetLeaderboard invokes getLeaderboard operation.
Returns the top players by current rating or total EXP who were active during the requested period. Results are cached for 5 minutes.
GET /leaderboard
func (*Client) GetPlayerAchievements ¶
func (c *Client) GetPlayerAchievements(ctx context.Context) (GetPlayerAchievementsRes, error)
GetPlayerAchievements invokes getPlayerAchievements operation.
Returns the full list of achievements with their unlocked status for the currently authenticated player.
GET /player/achievements
func (*Client) GetPlayerStateUID ¶
func (c *Client) GetPlayerStateUID(ctx context.Context, params GetPlayerStateUIDParams) (GetPlayerStateUIDRes, error)
GetPlayerStateUID invokes getPlayerStateUID operation.
Get user state.
GET /player/state/{uid}
func (*Client) GetPlayerStats ¶
func (c *Client) GetPlayerStats(ctx context.Context) (GetPlayerStatsRes, error)
GetPlayerStats invokes getPlayerStats operation.
Returns lifetime aggregated statistics for the currently authenticated player: games played, wins/losses/draws, win rate, average word length, best word and favorite letter.
GET /player/stats
func (*Client) JoinGame ¶
func (c *Client) JoinGame(ctx context.Context, params JoinGameParams) (JoinGameRes, error)
JoinGame invokes joinGame operation.
Adds the authenticated player to the specified waiting game. When the second player joins (quorum of 2 is reached) the game transitions to in_progress and the first move belongs to the player who created the game.
POST /games/{id}/join
func (*Client) LeaveGame ¶
func (c *Client) LeaveGame(ctx context.Context, params LeaveGameParams) (LeaveGameRes, error)
LeaveGame invokes leaveGame operation.
Removes the player from a game in waiting status. If the game becomes empty, it is deleted. In-progress games cannot be left this way.
POST /games/{id}/leave
func (*Client) ListGames ¶
func (c *Client) ListGames(ctx context.Context) (ListGamesRes, error)
ListGames invokes listGames operation.
Returns a snapshot of all currently active games.
GET /games
func (*Client) Logout ¶
Logout invokes logout operation.
Revoke the current refresh token.
POST /auth/logout
func (*Client) MatchmakingJoin ¶
func (c *Client) MatchmakingJoin(ctx context.Context) (MatchmakingJoinRes, error)
MatchmakingJoin invokes matchmakingJoin operation.
Enqueues the player for quick matchmaking. When a human opponent with a close rating is found, a match_found event is published to the lobby channel; after a timeout the server starts a bot game.
POST /matchmaking/join
func (*Client) MatchmakingLeave ¶
func (c *Client) MatchmakingLeave(ctx context.Context) (MatchmakingLeaveRes, error)
MatchmakingLeave invokes matchmakingLeave operation.
Idempotent — leaving without being queued is not an error.
POST /matchmaking/leave
func (*Client) MoveGame ¶
func (c *Client) MoveGame(ctx context.Context, request *MoveRequest, params MoveGameParams) (MoveGameRes, error)
MoveGame invokes moveGame operation.
Places a new letter on the board and submits a word. If the word is valid, the player's score is updated and the turn passes to the opponent.
POST /games/{id}/move
func (*Client) Ping ¶
Ping invokes ping operation.
POST not GET — mutates session TTL. Returns 204 with X-Server-Time header instead of a JSON body to minimize bandwidth on frequent pings (every ping_delay ms).
POST /session/ping
func (*Client) ProposeEndGame ¶
func (c *Client) ProposeEndGame(ctx context.Context, params ProposeEndGameParams) (ProposeEndGameRes, error)
ProposeEndGame invokes proposeEndGame operation.
The current player proposes to end the game (e.g. no valid moves are available). The turn timer is paused until the opponent responds. Only the player whose turn it currently is may call this.
POST /games/{id}/propose-end
func (*Client) RefreshToken ¶
func (c *Client) RefreshToken(ctx context.Context, request *RefreshRequest) (RefreshTokenRes, error)
RefreshToken invokes refreshToken operation.
Exchange a refresh token for a new access/refresh pair.
POST /auth/refresh
func (*Client) RejectEndGame ¶
func (c *Client) RejectEndGame(ctx context.Context, params RejectEndGameParams) (RejectEndGameRes, error)
RejectEndGame invokes rejectEndGame operation.
The opponent rejects the end-game proposal. The game resumes with the remaining turn time (minimum 10 seconds). Only the non-proposing player may call this.
POST /games/{id}/reject-end
func (*Client) SkipGame ¶
func (c *Client) SkipGame(ctx context.Context, params SkipGameParams) (SkipGameRes, error)
SkipGame invokes skipGame operation.
Ends the current turn without making a move. The turn passes to the opponent.
POST /games/{id}/skip
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
ClientOption is client config option.
func WithClient ¶
func WithClient(client ht.Client) ClientOption
WithClient specifies http client to use.
type ConfigResponse ¶
type ConfigResponse struct {
// Whether email/password registration is available.
EmailSignupEnabled OptBool `json:"email_signup_enabled"`
}
Ref: #/components/schemas/ConfigResponse
func (*ConfigResponse) Decode ¶
func (s *ConfigResponse) Decode(d *jx.Decoder) error
Decode decodes ConfigResponse from json.
func (*ConfigResponse) Encode ¶
func (s *ConfigResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ConfigResponse) GetEmailSignupEnabled ¶
func (s *ConfigResponse) GetEmailSignupEnabled() OptBool
GetEmailSignupEnabled returns the value of EmailSignupEnabled.
func (*ConfigResponse) MarshalJSON ¶
func (s *ConfigResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ConfigResponse) SetEmailSignupEnabled ¶
func (s *ConfigResponse) SetEmailSignupEnabled(val OptBool)
SetEmailSignupEnabled sets the value of EmailSignupEnabled.
func (*ConfigResponse) UnmarshalJSON ¶
func (s *ConfigResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateGameRes ¶
type CreateGameRes interface {
// contains filtered or unexported methods
}
type CreateGameResponse ¶
type CreateGameResponse struct {
Game OptGameSummary `json:"game"`
// Centrifugo subscription JWT for the game channel.
GameToken OptString `json:"game_token"`
}
Ref: #/components/schemas/CreateGameResponse
func (*CreateGameResponse) Decode ¶
func (s *CreateGameResponse) Decode(d *jx.Decoder) error
Decode decodes CreateGameResponse from json.
func (*CreateGameResponse) Encode ¶
func (s *CreateGameResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateGameResponse) GetGame ¶
func (s *CreateGameResponse) GetGame() OptGameSummary
GetGame returns the value of Game.
func (*CreateGameResponse) GetGameToken ¶
func (s *CreateGameResponse) GetGameToken() OptString
GetGameToken returns the value of GameToken.
func (*CreateGameResponse) MarshalJSON ¶
func (s *CreateGameResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateGameResponse) SetGame ¶
func (s *CreateGameResponse) SetGame(val OptGameSummary)
SetGame sets the value of Game.
func (*CreateGameResponse) SetGameToken ¶
func (s *CreateGameResponse) SetGameToken(val OptString)
SetGameToken sets the value of GameToken.
func (*CreateGameResponse) UnmarshalJSON ¶
func (s *CreateGameResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateGameResponse) Validate ¶
func (s *CreateGameResponse) Validate() error
type CreateGameWithBotConflict ¶
type CreateGameWithBotConflict ErrorResponse
func (*CreateGameWithBotConflict) Decode ¶
func (s *CreateGameWithBotConflict) Decode(d *jx.Decoder) error
Decode decodes CreateGameWithBotConflict from json.
func (*CreateGameWithBotConflict) Encode ¶
func (s *CreateGameWithBotConflict) Encode(e *jx.Encoder)
Encode encodes CreateGameWithBotConflict as json.
func (*CreateGameWithBotConflict) MarshalJSON ¶
func (s *CreateGameWithBotConflict) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateGameWithBotConflict) UnmarshalJSON ¶
func (s *CreateGameWithBotConflict) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateGameWithBotInternalServerError ¶
type CreateGameWithBotInternalServerError ErrorResponse
func (*CreateGameWithBotInternalServerError) Decode ¶
func (s *CreateGameWithBotInternalServerError) Decode(d *jx.Decoder) error
Decode decodes CreateGameWithBotInternalServerError from json.
func (*CreateGameWithBotInternalServerError) Encode ¶
func (s *CreateGameWithBotInternalServerError) Encode(e *jx.Encoder)
Encode encodes CreateGameWithBotInternalServerError as json.
func (*CreateGameWithBotInternalServerError) MarshalJSON ¶
func (s *CreateGameWithBotInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateGameWithBotInternalServerError) UnmarshalJSON ¶
func (s *CreateGameWithBotInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateGameWithBotRes ¶
type CreateGameWithBotRes interface {
// contains filtered or unexported methods
}
type CreateGameWithBotUnauthorized ¶
type CreateGameWithBotUnauthorized ErrorResponse
func (*CreateGameWithBotUnauthorized) Decode ¶
func (s *CreateGameWithBotUnauthorized) Decode(d *jx.Decoder) error
Decode decodes CreateGameWithBotUnauthorized from json.
func (*CreateGameWithBotUnauthorized) Encode ¶
func (s *CreateGameWithBotUnauthorized) Encode(e *jx.Encoder)
Encode encodes CreateGameWithBotUnauthorized as json.
func (*CreateGameWithBotUnauthorized) MarshalJSON ¶
func (s *CreateGameWithBotUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateGameWithBotUnauthorized) UnmarshalJSON ¶
func (s *CreateGameWithBotUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ErrorResponse ¶
type ErrorResponse struct {
// The HTTP response code.
Status OptInt `json:"status"`
// A human-readable explanation of the error.
Message OptString `json:"message"`
// Type of the error message.
Type OptString `json:"type"`
}
Ref: #/components/schemas/ErrorResponse
func (*ErrorResponse) Decode ¶
func (s *ErrorResponse) Decode(d *jx.Decoder) error
Decode decodes ErrorResponse from json.
func (*ErrorResponse) Encode ¶
func (s *ErrorResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ErrorResponse) GetMessage ¶
func (s *ErrorResponse) GetMessage() OptString
GetMessage returns the value of Message.
func (*ErrorResponse) GetStatus ¶
func (s *ErrorResponse) GetStatus() OptInt
GetStatus returns the value of Status.
func (*ErrorResponse) GetType ¶
func (s *ErrorResponse) GetType() OptString
GetType returns the value of Type.
func (*ErrorResponse) MarshalJSON ¶
func (s *ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ErrorResponse) SetMessage ¶
func (s *ErrorResponse) SetMessage(val OptString)
SetMessage sets the value of Message.
func (*ErrorResponse) SetStatus ¶
func (s *ErrorResponse) SetStatus(val OptInt)
SetStatus sets the value of Status.
func (*ErrorResponse) SetType ¶
func (s *ErrorResponse) SetType(val OptString)
SetType sets the value of Type.
func (*ErrorResponse) UnmarshalJSON ¶
func (s *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GameStatus ¶
type GameStatus string
Current state of the game. Ref: #/components/schemas/GameStatus
const ( GameStatusWaiting GameStatus = "waiting" GameStatusInProgress GameStatus = "in_progress" GameStatusFinished GameStatus = "finished" )
func (GameStatus) AllValues ¶
func (GameStatus) AllValues() []GameStatus
AllValues returns all GameStatus values.
func (*GameStatus) Decode ¶
func (s *GameStatus) Decode(d *jx.Decoder) error
Decode decodes GameStatus from json.
func (GameStatus) Encode ¶
func (s GameStatus) Encode(e *jx.Encoder)
Encode encodes GameStatus as json.
func (GameStatus) MarshalJSON ¶
func (s GameStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (GameStatus) MarshalText ¶
func (s GameStatus) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*GameStatus) UnmarshalJSON ¶
func (s *GameStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*GameStatus) UnmarshalText ¶
func (s *GameStatus) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (GameStatus) Validate ¶
func (s GameStatus) Validate() error
type GameSummary ¶
type GameSummary struct {
// Game ID.
ID OptUUID `json:"id"`
// IDs of players participating in the game.
PlayerIds []uuid.UUID `json:"player_ids"`
// Players with EXP info.
Players []LobbyPlayer `json:"players"`
Status OptGameStatus `json:"status"`
// When the game was started (Unix timestamp in milliseconds).
StartedAt OptInt64 `json:"started_at"`
}
Ref: #/components/schemas/GameSummary
func (*GameSummary) Decode ¶
func (s *GameSummary) Decode(d *jx.Decoder) error
Decode decodes GameSummary from json.
func (*GameSummary) Encode ¶
func (s *GameSummary) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*GameSummary) GetPlayerIds ¶
func (s *GameSummary) GetPlayerIds() []uuid.UUID
GetPlayerIds returns the value of PlayerIds.
func (*GameSummary) GetPlayers ¶
func (s *GameSummary) GetPlayers() []LobbyPlayer
GetPlayers returns the value of Players.
func (*GameSummary) GetStartedAt ¶
func (s *GameSummary) GetStartedAt() OptInt64
GetStartedAt returns the value of StartedAt.
func (*GameSummary) GetStatus ¶
func (s *GameSummary) GetStatus() OptGameStatus
GetStatus returns the value of Status.
func (*GameSummary) MarshalJSON ¶
func (s *GameSummary) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GameSummary) SetPlayerIds ¶
func (s *GameSummary) SetPlayerIds(val []uuid.UUID)
SetPlayerIds sets the value of PlayerIds.
func (*GameSummary) SetPlayers ¶
func (s *GameSummary) SetPlayers(val []LobbyPlayer)
SetPlayers sets the value of Players.
func (*GameSummary) SetStartedAt ¶
func (s *GameSummary) SetStartedAt(val OptInt64)
SetStartedAt sets the value of StartedAt.
func (*GameSummary) SetStatus ¶
func (s *GameSummary) SetStatus(val OptGameStatus)
SetStatus sets the value of Status.
func (*GameSummary) UnmarshalJSON ¶
func (s *GameSummary) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*GameSummary) Validate ¶
func (s *GameSummary) Validate() error
type GetLeaderboardBadRequest ¶
type GetLeaderboardBadRequest ErrorResponse
func (*GetLeaderboardBadRequest) Decode ¶
func (s *GetLeaderboardBadRequest) Decode(d *jx.Decoder) error
Decode decodes GetLeaderboardBadRequest from json.
func (*GetLeaderboardBadRequest) Encode ¶
func (s *GetLeaderboardBadRequest) Encode(e *jx.Encoder)
Encode encodes GetLeaderboardBadRequest as json.
func (*GetLeaderboardBadRequest) MarshalJSON ¶
func (s *GetLeaderboardBadRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetLeaderboardBadRequest) UnmarshalJSON ¶
func (s *GetLeaderboardBadRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetLeaderboardInternalServerError ¶
type GetLeaderboardInternalServerError ErrorResponse
func (*GetLeaderboardInternalServerError) Decode ¶
func (s *GetLeaderboardInternalServerError) Decode(d *jx.Decoder) error
Decode decodes GetLeaderboardInternalServerError from json.
func (*GetLeaderboardInternalServerError) Encode ¶
func (s *GetLeaderboardInternalServerError) Encode(e *jx.Encoder)
Encode encodes GetLeaderboardInternalServerError as json.
func (*GetLeaderboardInternalServerError) MarshalJSON ¶
func (s *GetLeaderboardInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetLeaderboardInternalServerError) UnmarshalJSON ¶
func (s *GetLeaderboardInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetLeaderboardParams ¶
type GetLeaderboardParams struct {
// Leaderboard period.
Period GetLeaderboardPeriod
// Sort field.
Sort OptGetLeaderboardSort `json:",omitempty,omitzero"`
// Maximum number of entries to return.
Limit OptInt `json:",omitempty,omitzero"`
}
GetLeaderboardParams is parameters of getLeaderboard operation.
type GetLeaderboardPeriod ¶
type GetLeaderboardPeriod string
const ( GetLeaderboardPeriodWeek GetLeaderboardPeriod = "week" GetLeaderboardPeriodMonth GetLeaderboardPeriod = "month" )
func (GetLeaderboardPeriod) AllValues ¶
func (GetLeaderboardPeriod) AllValues() []GetLeaderboardPeriod
AllValues returns all GetLeaderboardPeriod values.
func (GetLeaderboardPeriod) MarshalText ¶
func (s GetLeaderboardPeriod) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*GetLeaderboardPeriod) UnmarshalText ¶
func (s *GetLeaderboardPeriod) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (GetLeaderboardPeriod) Validate ¶
func (s GetLeaderboardPeriod) Validate() error
type GetLeaderboardRes ¶
type GetLeaderboardRes interface {
// contains filtered or unexported methods
}
type GetLeaderboardSort ¶
type GetLeaderboardSort string
const ( GetLeaderboardSortRating GetLeaderboardSort = "rating" GetLeaderboardSortExp GetLeaderboardSort = "exp" )
func (GetLeaderboardSort) AllValues ¶
func (GetLeaderboardSort) AllValues() []GetLeaderboardSort
AllValues returns all GetLeaderboardSort values.
func (GetLeaderboardSort) MarshalText ¶
func (s GetLeaderboardSort) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*GetLeaderboardSort) UnmarshalText ¶
func (s *GetLeaderboardSort) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (GetLeaderboardSort) Validate ¶
func (s GetLeaderboardSort) Validate() error
type GetPlayerAchievementsInternalServerError ¶
type GetPlayerAchievementsInternalServerError ErrorResponse
func (*GetPlayerAchievementsInternalServerError) Decode ¶
func (s *GetPlayerAchievementsInternalServerError) Decode(d *jx.Decoder) error
Decode decodes GetPlayerAchievementsInternalServerError from json.
func (*GetPlayerAchievementsInternalServerError) Encode ¶
func (s *GetPlayerAchievementsInternalServerError) Encode(e *jx.Encoder)
Encode encodes GetPlayerAchievementsInternalServerError as json.
func (*GetPlayerAchievementsInternalServerError) MarshalJSON ¶
func (s *GetPlayerAchievementsInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetPlayerAchievementsInternalServerError) UnmarshalJSON ¶
func (s *GetPlayerAchievementsInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetPlayerAchievementsRes ¶
type GetPlayerAchievementsRes interface {
// contains filtered or unexported methods
}
type GetPlayerAchievementsUnauthorized ¶
type GetPlayerAchievementsUnauthorized ErrorResponse
func (*GetPlayerAchievementsUnauthorized) Decode ¶
func (s *GetPlayerAchievementsUnauthorized) Decode(d *jx.Decoder) error
Decode decodes GetPlayerAchievementsUnauthorized from json.
func (*GetPlayerAchievementsUnauthorized) Encode ¶
func (s *GetPlayerAchievementsUnauthorized) Encode(e *jx.Encoder)
Encode encodes GetPlayerAchievementsUnauthorized as json.
func (*GetPlayerAchievementsUnauthorized) MarshalJSON ¶
func (s *GetPlayerAchievementsUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetPlayerAchievementsUnauthorized) UnmarshalJSON ¶
func (s *GetPlayerAchievementsUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetPlayerStateUIDBadRequest ¶
type GetPlayerStateUIDBadRequest ErrorResponse
func (*GetPlayerStateUIDBadRequest) Decode ¶
func (s *GetPlayerStateUIDBadRequest) Decode(d *jx.Decoder) error
Decode decodes GetPlayerStateUIDBadRequest from json.
func (*GetPlayerStateUIDBadRequest) Encode ¶
func (s *GetPlayerStateUIDBadRequest) Encode(e *jx.Encoder)
Encode encodes GetPlayerStateUIDBadRequest as json.
func (*GetPlayerStateUIDBadRequest) MarshalJSON ¶
func (s *GetPlayerStateUIDBadRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetPlayerStateUIDBadRequest) UnmarshalJSON ¶
func (s *GetPlayerStateUIDBadRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetPlayerStateUIDForbidden ¶
type GetPlayerStateUIDForbidden ErrorResponse
func (*GetPlayerStateUIDForbidden) Decode ¶
func (s *GetPlayerStateUIDForbidden) Decode(d *jx.Decoder) error
Decode decodes GetPlayerStateUIDForbidden from json.
func (*GetPlayerStateUIDForbidden) Encode ¶
func (s *GetPlayerStateUIDForbidden) Encode(e *jx.Encoder)
Encode encodes GetPlayerStateUIDForbidden as json.
func (*GetPlayerStateUIDForbidden) MarshalJSON ¶
func (s *GetPlayerStateUIDForbidden) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetPlayerStateUIDForbidden) UnmarshalJSON ¶
func (s *GetPlayerStateUIDForbidden) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetPlayerStateUIDParams ¶
GetPlayerStateUIDParams is parameters of getPlayerStateUID operation.
type GetPlayerStateUIDRes ¶
type GetPlayerStateUIDRes interface {
// contains filtered or unexported methods
}
type GetPlayerStateUIDUnauthorized ¶
type GetPlayerStateUIDUnauthorized ErrorResponse
func (*GetPlayerStateUIDUnauthorized) Decode ¶
func (s *GetPlayerStateUIDUnauthorized) Decode(d *jx.Decoder) error
Decode decodes GetPlayerStateUIDUnauthorized from json.
func (*GetPlayerStateUIDUnauthorized) Encode ¶
func (s *GetPlayerStateUIDUnauthorized) Encode(e *jx.Encoder)
Encode encodes GetPlayerStateUIDUnauthorized as json.
func (*GetPlayerStateUIDUnauthorized) MarshalJSON ¶
func (s *GetPlayerStateUIDUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetPlayerStateUIDUnauthorized) UnmarshalJSON ¶
func (s *GetPlayerStateUIDUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetPlayerStatsInternalServerError ¶
type GetPlayerStatsInternalServerError ErrorResponse
func (*GetPlayerStatsInternalServerError) Decode ¶
func (s *GetPlayerStatsInternalServerError) Decode(d *jx.Decoder) error
Decode decodes GetPlayerStatsInternalServerError from json.
func (*GetPlayerStatsInternalServerError) Encode ¶
func (s *GetPlayerStatsInternalServerError) Encode(e *jx.Encoder)
Encode encodes GetPlayerStatsInternalServerError as json.
func (*GetPlayerStatsInternalServerError) MarshalJSON ¶
func (s *GetPlayerStatsInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetPlayerStatsInternalServerError) UnmarshalJSON ¶
func (s *GetPlayerStatsInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type GetPlayerStatsRes ¶
type GetPlayerStatsRes interface {
// contains filtered or unexported methods
}
type GetPlayerStatsUnauthorized ¶
type GetPlayerStatsUnauthorized ErrorResponse
func (*GetPlayerStatsUnauthorized) Decode ¶
func (s *GetPlayerStatsUnauthorized) Decode(d *jx.Decoder) error
Decode decodes GetPlayerStatsUnauthorized from json.
func (*GetPlayerStatsUnauthorized) Encode ¶
func (s *GetPlayerStatsUnauthorized) Encode(e *jx.Encoder)
Encode encodes GetPlayerStatsUnauthorized as json.
func (*GetPlayerStatsUnauthorized) MarshalJSON ¶
func (s *GetPlayerStatsUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetPlayerStatsUnauthorized) UnmarshalJSON ¶
func (s *GetPlayerStatsUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type Handler ¶
type Handler interface {
// AcceptEndGame implements acceptEndGame operation.
//
// The opponent accepts the end-game proposal. The game ends immediately with the current scores. Only
// the non-proposing player may call this.
//
// POST /games/{id}/accept-end
AcceptEndGame(ctx context.Context, params AcceptEndGameParams) (AcceptEndGameRes, error)
// Auth implements auth operation.
//
// Auth request.
//
// POST /auth
Auth(ctx context.Context, req *AuthRequest) (AuthRes, error)
// AuthTelegram implements authTelegram operation.
//
// Validates the signed init data produced by the Telegram WebView against the bot token, then logs in
// an existing user or creates a new one linked to their Telegram account.
//
// POST /auth/telegram
AuthTelegram(ctx context.Context, req *TelegramAuthRequest) (AuthTelegramRes, error)
// CreateGame implements createGame operation.
//
// Create a new game.
//
// POST /games
CreateGame(ctx context.Context) (CreateGameRes, error)
// CreateGameWithBot implements createGameWithBot operation.
//
// Creates a new game where the authenticated player plays against a server-side bot. The game starts
// immediately and the first move belongs to the human player.
//
// POST /games/with-bot
CreateGameWithBot(ctx context.Context) (CreateGameWithBotRes, error)
// GetConfig implements getConfig operation.
//
// Returns feature flags the client needs before authentication, e.g. whether email/password
// registration is available.
//
// GET /config
GetConfig(ctx context.Context) (*ConfigResponse, error)
// GetLeaderboard implements getLeaderboard operation.
//
// Returns the top players by current rating or total EXP who were active during the requested period.
// Results are cached for 5 minutes.
//
// GET /leaderboard
GetLeaderboard(ctx context.Context, params GetLeaderboardParams) (GetLeaderboardRes, error)
// GetPlayerAchievements implements getPlayerAchievements operation.
//
// Returns the full list of achievements with their unlocked status for the currently authenticated
// player.
//
// GET /player/achievements
GetPlayerAchievements(ctx context.Context) (GetPlayerAchievementsRes, error)
// GetPlayerStateUID implements getPlayerStateUID operation.
//
// Get user state.
//
// GET /player/state/{uid}
GetPlayerStateUID(ctx context.Context, params GetPlayerStateUIDParams) (GetPlayerStateUIDRes, error)
// GetPlayerStats implements getPlayerStats operation.
//
// Returns lifetime aggregated statistics for the currently authenticated player: games played,
// wins/losses/draws, win rate, average word length, best word and favorite letter.
//
// GET /player/stats
GetPlayerStats(ctx context.Context) (GetPlayerStatsRes, error)
// JoinGame implements joinGame operation.
//
// Adds the authenticated player to the specified waiting game. When the second player joins (quorum of
// 2 is reached) the game transitions to in_progress and the first move belongs to the player who
// created the game.
//
// POST /games/{id}/join
JoinGame(ctx context.Context, params JoinGameParams) (JoinGameRes, error)
// LeaveGame implements leaveGame operation.
//
// Removes the player from a game in waiting status. If the game becomes empty, it is deleted.
// In-progress games cannot be left this way.
//
// POST /games/{id}/leave
LeaveGame(ctx context.Context, params LeaveGameParams) (LeaveGameRes, error)
// ListGames implements listGames operation.
//
// Returns a snapshot of all currently active games.
//
// GET /games
ListGames(ctx context.Context) (ListGamesRes, error)
// Logout implements logout operation.
//
// Revoke the current refresh token.
//
// POST /auth/logout
Logout(ctx context.Context, req OptLogoutRequest) (LogoutRes, error)
// MatchmakingJoin implements matchmakingJoin operation.
//
// Enqueues the player for quick matchmaking. When a human opponent with a close rating is found, a
// match_found event is published to the lobby channel; after a timeout the server starts a bot game.
//
// POST /matchmaking/join
MatchmakingJoin(ctx context.Context) (MatchmakingJoinRes, error)
// MatchmakingLeave implements matchmakingLeave operation.
//
// Idempotent — leaving without being queued is not an error.
//
// POST /matchmaking/leave
MatchmakingLeave(ctx context.Context) (MatchmakingLeaveRes, error)
// MoveGame implements moveGame operation.
//
// Places a new letter on the board and submits a word. If the word is valid, the player's score is
// updated and the turn passes to the opponent.
//
// POST /games/{id}/move
MoveGame(ctx context.Context, req *MoveRequest, params MoveGameParams) (MoveGameRes, error)
// Ping implements ping operation.
//
// POST not GET — mutates session TTL. Returns 204 with X-Server-Time header instead of a JSON body
// to minimize bandwidth on frequent pings (every ping_delay ms).
//
// POST /session/ping
Ping(ctx context.Context, params PingParams) (PingRes, error)
// ProposeEndGame implements proposeEndGame operation.
//
// The current player proposes to end the game (e.g. no valid moves are available). The turn timer is
// paused until the opponent responds. Only the player whose turn it currently is may call this.
//
// POST /games/{id}/propose-end
ProposeEndGame(ctx context.Context, params ProposeEndGameParams) (ProposeEndGameRes, error)
// RefreshToken implements refreshToken operation.
//
// Exchange a refresh token for a new access/refresh pair.
//
// POST /auth/refresh
RefreshToken(ctx context.Context, req *RefreshRequest) (RefreshTokenRes, error)
// RejectEndGame implements rejectEndGame operation.
//
// The opponent rejects the end-game proposal. The game resumes with the remaining turn time (minimum
// 10 seconds). Only the non-proposing player may call this.
//
// POST /games/{id}/reject-end
RejectEndGame(ctx context.Context, params RejectEndGameParams) (RejectEndGameRes, error)
// Signup implements signup operation.
//
// Sign-up request.
//
// POST /signup
Signup(ctx context.Context, req *SignupRequest) (SignupRes, error)
// SkipGame implements skipGame operation.
//
// Ends the current turn without making a move. The turn passes to the opponent.
//
// POST /games/{id}/skip
SkipGame(ctx context.Context, params SkipGameParams) (SkipGameRes, error)
}
Handler handles operations described by OpenAPI v3 specification.
type Invoker ¶
type Invoker interface {
// AcceptEndGame invokes acceptEndGame operation.
//
// The opponent accepts the end-game proposal. The game ends immediately with the current scores. Only
// the non-proposing player may call this.
//
// POST /games/{id}/accept-end
AcceptEndGame(ctx context.Context, params AcceptEndGameParams) (AcceptEndGameRes, error)
// Auth invokes auth operation.
//
// Auth request.
//
// POST /auth
Auth(ctx context.Context, request *AuthRequest) (AuthRes, error)
// AuthTelegram invokes authTelegram operation.
//
// Validates the signed init data produced by the Telegram WebView against the bot token, then logs in
// an existing user or creates a new one linked to their Telegram account.
//
// POST /auth/telegram
AuthTelegram(ctx context.Context, request *TelegramAuthRequest) (AuthTelegramRes, error)
// CreateGame invokes createGame operation.
//
// Create a new game.
//
// POST /games
CreateGame(ctx context.Context) (CreateGameRes, error)
// CreateGameWithBot invokes createGameWithBot operation.
//
// Creates a new game where the authenticated player plays against a server-side bot. The game starts
// immediately and the first move belongs to the human player.
//
// POST /games/with-bot
CreateGameWithBot(ctx context.Context) (CreateGameWithBotRes, error)
// GetConfig invokes getConfig operation.
//
// Returns feature flags the client needs before authentication, e.g. whether email/password
// registration is available.
//
// GET /config
GetConfig(ctx context.Context) (*ConfigResponse, error)
// GetLeaderboard invokes getLeaderboard operation.
//
// Returns the top players by current rating or total EXP who were active during the requested period.
// Results are cached for 5 minutes.
//
// GET /leaderboard
GetLeaderboard(ctx context.Context, params GetLeaderboardParams) (GetLeaderboardRes, error)
// GetPlayerAchievements invokes getPlayerAchievements operation.
//
// Returns the full list of achievements with their unlocked status for the currently authenticated
// player.
//
// GET /player/achievements
GetPlayerAchievements(ctx context.Context) (GetPlayerAchievementsRes, error)
// GetPlayerStateUID invokes getPlayerStateUID operation.
//
// Get user state.
//
// GET /player/state/{uid}
GetPlayerStateUID(ctx context.Context, params GetPlayerStateUIDParams) (GetPlayerStateUIDRes, error)
// GetPlayerStats invokes getPlayerStats operation.
//
// Returns lifetime aggregated statistics for the currently authenticated player: games played,
// wins/losses/draws, win rate, average word length, best word and favorite letter.
//
// GET /player/stats
GetPlayerStats(ctx context.Context) (GetPlayerStatsRes, error)
// JoinGame invokes joinGame operation.
//
// Adds the authenticated player to the specified waiting game. When the second player joins (quorum of
// 2 is reached) the game transitions to in_progress and the first move belongs to the player who
// created the game.
//
// POST /games/{id}/join
JoinGame(ctx context.Context, params JoinGameParams) (JoinGameRes, error)
// LeaveGame invokes leaveGame operation.
//
// Removes the player from a game in waiting status. If the game becomes empty, it is deleted.
// In-progress games cannot be left this way.
//
// POST /games/{id}/leave
LeaveGame(ctx context.Context, params LeaveGameParams) (LeaveGameRes, error)
// ListGames invokes listGames operation.
//
// Returns a snapshot of all currently active games.
//
// GET /games
ListGames(ctx context.Context) (ListGamesRes, error)
// Logout invokes logout operation.
//
// Revoke the current refresh token.
//
// POST /auth/logout
Logout(ctx context.Context, request OptLogoutRequest) (LogoutRes, error)
// MatchmakingJoin invokes matchmakingJoin operation.
//
// Enqueues the player for quick matchmaking. When a human opponent with a close rating is found, a
// match_found event is published to the lobby channel; after a timeout the server starts a bot game.
//
// POST /matchmaking/join
MatchmakingJoin(ctx context.Context) (MatchmakingJoinRes, error)
// MatchmakingLeave invokes matchmakingLeave operation.
//
// Idempotent — leaving without being queued is not an error.
//
// POST /matchmaking/leave
MatchmakingLeave(ctx context.Context) (MatchmakingLeaveRes, error)
// MoveGame invokes moveGame operation.
//
// Places a new letter on the board and submits a word. If the word is valid, the player's score is
// updated and the turn passes to the opponent.
//
// POST /games/{id}/move
MoveGame(ctx context.Context, request *MoveRequest, params MoveGameParams) (MoveGameRes, error)
// Ping invokes ping operation.
//
// POST not GET — mutates session TTL. Returns 204 with X-Server-Time header instead of a JSON body
// to minimize bandwidth on frequent pings (every ping_delay ms).
//
// POST /session/ping
Ping(ctx context.Context, params PingParams) (PingRes, error)
// ProposeEndGame invokes proposeEndGame operation.
//
// The current player proposes to end the game (e.g. no valid moves are available). The turn timer is
// paused until the opponent responds. Only the player whose turn it currently is may call this.
//
// POST /games/{id}/propose-end
ProposeEndGame(ctx context.Context, params ProposeEndGameParams) (ProposeEndGameRes, error)
// RefreshToken invokes refreshToken operation.
//
// Exchange a refresh token for a new access/refresh pair.
//
// POST /auth/refresh
RefreshToken(ctx context.Context, request *RefreshRequest) (RefreshTokenRes, error)
// RejectEndGame invokes rejectEndGame operation.
//
// The opponent rejects the end-game proposal. The game resumes with the remaining turn time (minimum
// 10 seconds). Only the non-proposing player may call this.
//
// POST /games/{id}/reject-end
RejectEndGame(ctx context.Context, params RejectEndGameParams) (RejectEndGameRes, error)
// Signup invokes signup operation.
//
// Sign-up request.
//
// POST /signup
Signup(ctx context.Context, request *SignupRequest) (SignupRes, error)
// SkipGame invokes skipGame operation.
//
// Ends the current turn without making a move. The turn passes to the opponent.
//
// POST /games/{id}/skip
SkipGame(ctx context.Context, params SkipGameParams) (SkipGameRes, error)
}
Invoker invokes operations described by OpenAPI v3 specification.
type JoinGameConflict ¶
type JoinGameConflict ErrorResponse
func (*JoinGameConflict) Decode ¶
func (s *JoinGameConflict) Decode(d *jx.Decoder) error
Decode decodes JoinGameConflict from json.
func (*JoinGameConflict) Encode ¶
func (s *JoinGameConflict) Encode(e *jx.Encoder)
Encode encodes JoinGameConflict as json.
func (*JoinGameConflict) MarshalJSON ¶
func (s *JoinGameConflict) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*JoinGameConflict) UnmarshalJSON ¶
func (s *JoinGameConflict) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type JoinGameInternalServerError ¶
type JoinGameInternalServerError ErrorResponse
func (*JoinGameInternalServerError) Decode ¶
func (s *JoinGameInternalServerError) Decode(d *jx.Decoder) error
Decode decodes JoinGameInternalServerError from json.
func (*JoinGameInternalServerError) Encode ¶
func (s *JoinGameInternalServerError) Encode(e *jx.Encoder)
Encode encodes JoinGameInternalServerError as json.
func (*JoinGameInternalServerError) MarshalJSON ¶
func (s *JoinGameInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*JoinGameInternalServerError) UnmarshalJSON ¶
func (s *JoinGameInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type JoinGameNotFound ¶
type JoinGameNotFound ErrorResponse
func (*JoinGameNotFound) Decode ¶
func (s *JoinGameNotFound) Decode(d *jx.Decoder) error
Decode decodes JoinGameNotFound from json.
func (*JoinGameNotFound) Encode ¶
func (s *JoinGameNotFound) Encode(e *jx.Encoder)
Encode encodes JoinGameNotFound as json.
func (*JoinGameNotFound) MarshalJSON ¶
func (s *JoinGameNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*JoinGameNotFound) UnmarshalJSON ¶
func (s *JoinGameNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type JoinGameParams ¶
JoinGameParams is parameters of joinGame operation.
type JoinGameRes ¶
type JoinGameRes interface {
// contains filtered or unexported methods
}
type JoinGameResponse ¶
type JoinGameResponse struct {
Game OptGameSummary `json:"game"`
// Centrifugo subscription JWT for the game channel.
GameToken OptString `json:"game_token"`
// Initial 5x5 board state. Each row is an array of 5 single-character strings (empty string means
// empty cell). Included so the joining player can render the board immediately without waiting for the
// Centrifugo game_state event.
Board [][]string `json:"board"`
// ID of the player whose turn it is first (the game creator).
CurrentTurnUID OptString `json:"current_turn_uid"`
}
Ref: #/components/schemas/JoinGameResponse
func (*JoinGameResponse) Decode ¶
func (s *JoinGameResponse) Decode(d *jx.Decoder) error
Decode decodes JoinGameResponse from json.
func (*JoinGameResponse) Encode ¶
func (s *JoinGameResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*JoinGameResponse) GetBoard ¶
func (s *JoinGameResponse) GetBoard() [][]string
GetBoard returns the value of Board.
func (*JoinGameResponse) GetCurrentTurnUID ¶
func (s *JoinGameResponse) GetCurrentTurnUID() OptString
GetCurrentTurnUID returns the value of CurrentTurnUID.
func (*JoinGameResponse) GetGame ¶
func (s *JoinGameResponse) GetGame() OptGameSummary
GetGame returns the value of Game.
func (*JoinGameResponse) GetGameToken ¶
func (s *JoinGameResponse) GetGameToken() OptString
GetGameToken returns the value of GameToken.
func (*JoinGameResponse) MarshalJSON ¶
func (s *JoinGameResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*JoinGameResponse) SetBoard ¶
func (s *JoinGameResponse) SetBoard(val [][]string)
SetBoard sets the value of Board.
func (*JoinGameResponse) SetCurrentTurnUID ¶
func (s *JoinGameResponse) SetCurrentTurnUID(val OptString)
SetCurrentTurnUID sets the value of CurrentTurnUID.
func (*JoinGameResponse) SetGame ¶
func (s *JoinGameResponse) SetGame(val OptGameSummary)
SetGame sets the value of Game.
func (*JoinGameResponse) SetGameToken ¶
func (s *JoinGameResponse) SetGameToken(val OptString)
SetGameToken sets the value of GameToken.
func (*JoinGameResponse) UnmarshalJSON ¶
func (s *JoinGameResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*JoinGameResponse) Validate ¶
func (s *JoinGameResponse) Validate() error
type JoinGameUnauthorized ¶
type JoinGameUnauthorized ErrorResponse
func (*JoinGameUnauthorized) Decode ¶
func (s *JoinGameUnauthorized) Decode(d *jx.Decoder) error
Decode decodes JoinGameUnauthorized from json.
func (*JoinGameUnauthorized) Encode ¶
func (s *JoinGameUnauthorized) Encode(e *jx.Encoder)
Encode encodes JoinGameUnauthorized as json.
func (*JoinGameUnauthorized) MarshalJSON ¶
func (s *JoinGameUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*JoinGameUnauthorized) UnmarshalJSON ¶
func (s *JoinGameUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type Labeler ¶
type Labeler struct {
// contains filtered or unexported fields
}
Labeler is used to allow adding custom attributes to the server request metrics.
func LabelerFromContext ¶
LabelerFromContext retrieves the Labeler from the provided context, if present.
If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.
func (*Labeler) AttributeSet ¶
AttributeSet returns the attributes added to the Labeler as an attribute.Set.
type LeaderboardEntry ¶
type LeaderboardEntry struct {
// Position in the leaderboard (1-based).
Rank OptInt `json:"rank"`
// Player's ID.
UID OptUUID `json:"uid"`
// Player's generated nickname.
Nickname OptString `json:"nickname"`
// Player's ELO rating.
Rating OptInt64 `json:"rating"`
// Player's total EXP.
Exp OptInt64 `json:"exp"`
}
Ref: #/components/schemas/LeaderboardEntry
func (*LeaderboardEntry) Decode ¶
func (s *LeaderboardEntry) Decode(d *jx.Decoder) error
Decode decodes LeaderboardEntry from json.
func (*LeaderboardEntry) Encode ¶
func (s *LeaderboardEntry) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*LeaderboardEntry) GetExp ¶
func (s *LeaderboardEntry) GetExp() OptInt64
GetExp returns the value of Exp.
func (*LeaderboardEntry) GetNickname ¶
func (s *LeaderboardEntry) GetNickname() OptString
GetNickname returns the value of Nickname.
func (*LeaderboardEntry) GetRank ¶
func (s *LeaderboardEntry) GetRank() OptInt
GetRank returns the value of Rank.
func (*LeaderboardEntry) GetRating ¶
func (s *LeaderboardEntry) GetRating() OptInt64
GetRating returns the value of Rating.
func (*LeaderboardEntry) GetUID ¶
func (s *LeaderboardEntry) GetUID() OptUUID
GetUID returns the value of UID.
func (*LeaderboardEntry) MarshalJSON ¶
func (s *LeaderboardEntry) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*LeaderboardEntry) SetExp ¶
func (s *LeaderboardEntry) SetExp(val OptInt64)
SetExp sets the value of Exp.
func (*LeaderboardEntry) SetNickname ¶
func (s *LeaderboardEntry) SetNickname(val OptString)
SetNickname sets the value of Nickname.
func (*LeaderboardEntry) SetRank ¶
func (s *LeaderboardEntry) SetRank(val OptInt)
SetRank sets the value of Rank.
func (*LeaderboardEntry) SetRating ¶
func (s *LeaderboardEntry) SetRating(val OptInt64)
SetRating sets the value of Rating.
func (*LeaderboardEntry) SetUID ¶
func (s *LeaderboardEntry) SetUID(val OptUUID)
SetUID sets the value of UID.
func (*LeaderboardEntry) UnmarshalJSON ¶
func (s *LeaderboardEntry) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type LeaderboardResponse ¶
type LeaderboardResponse struct {
// Leaderboard period.
Period OptLeaderboardResponsePeriod `json:"period"`
// Sort field.
Sort OptLeaderboardResponseSort `json:"sort"`
// Unix timestamp in milliseconds when the leaderboard was generated.
GeneratedAt OptInt64 `json:"generated_at"`
// Leaderboard entries ordered by rank.
Players []LeaderboardEntry `json:"players"`
}
Ref: #/components/schemas/LeaderboardResponse
func (*LeaderboardResponse) Decode ¶
func (s *LeaderboardResponse) Decode(d *jx.Decoder) error
Decode decodes LeaderboardResponse from json.
func (*LeaderboardResponse) Encode ¶
func (s *LeaderboardResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*LeaderboardResponse) GetGeneratedAt ¶
func (s *LeaderboardResponse) GetGeneratedAt() OptInt64
GetGeneratedAt returns the value of GeneratedAt.
func (*LeaderboardResponse) GetPeriod ¶
func (s *LeaderboardResponse) GetPeriod() OptLeaderboardResponsePeriod
GetPeriod returns the value of Period.
func (*LeaderboardResponse) GetPlayers ¶
func (s *LeaderboardResponse) GetPlayers() []LeaderboardEntry
GetPlayers returns the value of Players.
func (*LeaderboardResponse) GetSort ¶
func (s *LeaderboardResponse) GetSort() OptLeaderboardResponseSort
GetSort returns the value of Sort.
func (*LeaderboardResponse) MarshalJSON ¶
func (s *LeaderboardResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*LeaderboardResponse) SetGeneratedAt ¶
func (s *LeaderboardResponse) SetGeneratedAt(val OptInt64)
SetGeneratedAt sets the value of GeneratedAt.
func (*LeaderboardResponse) SetPeriod ¶
func (s *LeaderboardResponse) SetPeriod(val OptLeaderboardResponsePeriod)
SetPeriod sets the value of Period.
func (*LeaderboardResponse) SetPlayers ¶
func (s *LeaderboardResponse) SetPlayers(val []LeaderboardEntry)
SetPlayers sets the value of Players.
func (*LeaderboardResponse) SetSort ¶
func (s *LeaderboardResponse) SetSort(val OptLeaderboardResponseSort)
SetSort sets the value of Sort.
func (*LeaderboardResponse) UnmarshalJSON ¶
func (s *LeaderboardResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*LeaderboardResponse) Validate ¶
func (s *LeaderboardResponse) Validate() error
type LeaderboardResponsePeriod ¶
type LeaderboardResponsePeriod string
Leaderboard period.
const ( LeaderboardResponsePeriodWeek LeaderboardResponsePeriod = "week" LeaderboardResponsePeriodMonth LeaderboardResponsePeriod = "month" )
func (LeaderboardResponsePeriod) AllValues ¶
func (LeaderboardResponsePeriod) AllValues() []LeaderboardResponsePeriod
AllValues returns all LeaderboardResponsePeriod values.
func (*LeaderboardResponsePeriod) Decode ¶
func (s *LeaderboardResponsePeriod) Decode(d *jx.Decoder) error
Decode decodes LeaderboardResponsePeriod from json.
func (LeaderboardResponsePeriod) Encode ¶
func (s LeaderboardResponsePeriod) Encode(e *jx.Encoder)
Encode encodes LeaderboardResponsePeriod as json.
func (LeaderboardResponsePeriod) MarshalJSON ¶
func (s LeaderboardResponsePeriod) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (LeaderboardResponsePeriod) MarshalText ¶
func (s LeaderboardResponsePeriod) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*LeaderboardResponsePeriod) UnmarshalJSON ¶
func (s *LeaderboardResponsePeriod) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*LeaderboardResponsePeriod) UnmarshalText ¶
func (s *LeaderboardResponsePeriod) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (LeaderboardResponsePeriod) Validate ¶
func (s LeaderboardResponsePeriod) Validate() error
type LeaderboardResponseSort ¶
type LeaderboardResponseSort string
Sort field.
const ( LeaderboardResponseSortRating LeaderboardResponseSort = "rating" LeaderboardResponseSortExp LeaderboardResponseSort = "exp" )
func (LeaderboardResponseSort) AllValues ¶
func (LeaderboardResponseSort) AllValues() []LeaderboardResponseSort
AllValues returns all LeaderboardResponseSort values.
func (*LeaderboardResponseSort) Decode ¶
func (s *LeaderboardResponseSort) Decode(d *jx.Decoder) error
Decode decodes LeaderboardResponseSort from json.
func (LeaderboardResponseSort) Encode ¶
func (s LeaderboardResponseSort) Encode(e *jx.Encoder)
Encode encodes LeaderboardResponseSort as json.
func (LeaderboardResponseSort) MarshalJSON ¶
func (s LeaderboardResponseSort) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (LeaderboardResponseSort) MarshalText ¶
func (s LeaderboardResponseSort) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*LeaderboardResponseSort) UnmarshalJSON ¶
func (s *LeaderboardResponseSort) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*LeaderboardResponseSort) UnmarshalText ¶
func (s *LeaderboardResponseSort) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (LeaderboardResponseSort) Validate ¶
func (s LeaderboardResponseSort) Validate() error
type LeaveGameConflict ¶
type LeaveGameConflict ErrorResponse
func (*LeaveGameConflict) Decode ¶
func (s *LeaveGameConflict) Decode(d *jx.Decoder) error
Decode decodes LeaveGameConflict from json.
func (*LeaveGameConflict) Encode ¶
func (s *LeaveGameConflict) Encode(e *jx.Encoder)
Encode encodes LeaveGameConflict as json.
func (*LeaveGameConflict) MarshalJSON ¶
func (s *LeaveGameConflict) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*LeaveGameConflict) UnmarshalJSON ¶
func (s *LeaveGameConflict) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type LeaveGameForbidden ¶
type LeaveGameForbidden ErrorResponse
func (*LeaveGameForbidden) Decode ¶
func (s *LeaveGameForbidden) Decode(d *jx.Decoder) error
Decode decodes LeaveGameForbidden from json.
func (*LeaveGameForbidden) Encode ¶
func (s *LeaveGameForbidden) Encode(e *jx.Encoder)
Encode encodes LeaveGameForbidden as json.
func (*LeaveGameForbidden) MarshalJSON ¶
func (s *LeaveGameForbidden) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*LeaveGameForbidden) UnmarshalJSON ¶
func (s *LeaveGameForbidden) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type LeaveGameNoContent ¶
type LeaveGameNoContent struct{}
LeaveGameNoContent is response for LeaveGame operation.
type LeaveGameNotFound ¶
type LeaveGameNotFound ErrorResponse
func (*LeaveGameNotFound) Decode ¶
func (s *LeaveGameNotFound) Decode(d *jx.Decoder) error
Decode decodes LeaveGameNotFound from json.
func (*LeaveGameNotFound) Encode ¶
func (s *LeaveGameNotFound) Encode(e *jx.Encoder)
Encode encodes LeaveGameNotFound as json.
func (*LeaveGameNotFound) MarshalJSON ¶
func (s *LeaveGameNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*LeaveGameNotFound) UnmarshalJSON ¶
func (s *LeaveGameNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type LeaveGameParams ¶
LeaveGameParams is parameters of leaveGame operation.
type LeaveGameRes ¶
type LeaveGameRes interface {
// contains filtered or unexported methods
}
type LeaveGameUnauthorized ¶
type LeaveGameUnauthorized ErrorResponse
func (*LeaveGameUnauthorized) Decode ¶
func (s *LeaveGameUnauthorized) Decode(d *jx.Decoder) error
Decode decodes LeaveGameUnauthorized from json.
func (*LeaveGameUnauthorized) Encode ¶
func (s *LeaveGameUnauthorized) Encode(e *jx.Encoder)
Encode encodes LeaveGameUnauthorized as json.
func (*LeaveGameUnauthorized) MarshalJSON ¶
func (s *LeaveGameUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*LeaveGameUnauthorized) UnmarshalJSON ¶
func (s *LeaveGameUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ListGamesRes ¶
type ListGamesRes interface {
// contains filtered or unexported methods
}
type ListGamesResponse ¶
type ListGamesResponse struct {
Games []GameSummary `json:"games"`
}
Ref: #/components/schemas/ListGamesResponse
func (*ListGamesResponse) Decode ¶
func (s *ListGamesResponse) Decode(d *jx.Decoder) error
Decode decodes ListGamesResponse from json.
func (*ListGamesResponse) Encode ¶
func (s *ListGamesResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ListGamesResponse) GetGames ¶
func (s *ListGamesResponse) GetGames() []GameSummary
GetGames returns the value of Games.
func (*ListGamesResponse) MarshalJSON ¶
func (s *ListGamesResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListGamesResponse) SetGames ¶
func (s *ListGamesResponse) SetGames(val []GameSummary)
SetGames sets the value of Games.
func (*ListGamesResponse) UnmarshalJSON ¶
func (s *ListGamesResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ListGamesResponse) Validate ¶
func (s *ListGamesResponse) Validate() error
type LobbyPlayer ¶
type LobbyPlayer struct {
// Player's ID.
UID OptUUID `json:"uid"`
// Player's total EXP.
Exp OptInt64 `json:"exp"`
// Player's ELO rating.
Rating OptInt64 `json:"rating"`
}
Ref: #/components/schemas/LobbyPlayer
func (*LobbyPlayer) Decode ¶
func (s *LobbyPlayer) Decode(d *jx.Decoder) error
Decode decodes LobbyPlayer from json.
func (*LobbyPlayer) Encode ¶
func (s *LobbyPlayer) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*LobbyPlayer) GetExp ¶
func (s *LobbyPlayer) GetExp() OptInt64
GetExp returns the value of Exp.
func (*LobbyPlayer) GetRating ¶
func (s *LobbyPlayer) GetRating() OptInt64
GetRating returns the value of Rating.
func (*LobbyPlayer) GetUID ¶
func (s *LobbyPlayer) GetUID() OptUUID
GetUID returns the value of UID.
func (*LobbyPlayer) MarshalJSON ¶
func (s *LobbyPlayer) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*LobbyPlayer) SetExp ¶
func (s *LobbyPlayer) SetExp(val OptInt64)
SetExp sets the value of Exp.
func (*LobbyPlayer) SetRating ¶
func (s *LobbyPlayer) SetRating(val OptInt64)
SetRating sets the value of Rating.
func (*LobbyPlayer) SetUID ¶
func (s *LobbyPlayer) SetUID(val OptUUID)
SetUID sets the value of UID.
func (*LobbyPlayer) UnmarshalJSON ¶
func (s *LobbyPlayer) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type LogoutNoContent ¶
type LogoutNoContent struct{}
LogoutNoContent is response for Logout operation.
type LogoutRequest ¶
type LogoutRequest struct {
// Optional. The refresh token to revoke for this device.
RefreshToken OptString `json:"refresh_token"`
}
Ref: #/components/schemas/LogoutRequest
func (*LogoutRequest) Decode ¶
func (s *LogoutRequest) Decode(d *jx.Decoder) error
Decode decodes LogoutRequest from json.
func (*LogoutRequest) Encode ¶
func (s *LogoutRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*LogoutRequest) GetRefreshToken ¶
func (s *LogoutRequest) GetRefreshToken() OptString
GetRefreshToken returns the value of RefreshToken.
func (*LogoutRequest) MarshalJSON ¶
func (s *LogoutRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*LogoutRequest) SetRefreshToken ¶
func (s *LogoutRequest) SetRefreshToken(val OptString)
SetRefreshToken sets the value of RefreshToken.
func (*LogoutRequest) UnmarshalJSON ¶
func (s *LogoutRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type MatchmakingJoinConflict ¶
type MatchmakingJoinConflict ErrorResponse
func (*MatchmakingJoinConflict) Decode ¶
func (s *MatchmakingJoinConflict) Decode(d *jx.Decoder) error
Decode decodes MatchmakingJoinConflict from json.
func (*MatchmakingJoinConflict) Encode ¶
func (s *MatchmakingJoinConflict) Encode(e *jx.Encoder)
Encode encodes MatchmakingJoinConflict as json.
func (*MatchmakingJoinConflict) MarshalJSON ¶
func (s *MatchmakingJoinConflict) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MatchmakingJoinConflict) UnmarshalJSON ¶
func (s *MatchmakingJoinConflict) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type MatchmakingJoinInternalServerError ¶
type MatchmakingJoinInternalServerError ErrorResponse
func (*MatchmakingJoinInternalServerError) Decode ¶
func (s *MatchmakingJoinInternalServerError) Decode(d *jx.Decoder) error
Decode decodes MatchmakingJoinInternalServerError from json.
func (*MatchmakingJoinInternalServerError) Encode ¶
func (s *MatchmakingJoinInternalServerError) Encode(e *jx.Encoder)
Encode encodes MatchmakingJoinInternalServerError as json.
func (*MatchmakingJoinInternalServerError) MarshalJSON ¶
func (s *MatchmakingJoinInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MatchmakingJoinInternalServerError) UnmarshalJSON ¶
func (s *MatchmakingJoinInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type MatchmakingJoinRes ¶
type MatchmakingJoinRes interface {
// contains filtered or unexported methods
}
type MatchmakingJoinResponse ¶
type MatchmakingJoinResponse struct {
// Queue status after joining.
Status OptMatchmakingJoinResponseStatus `json:"status"`
}
Ref: #/components/schemas/MatchmakingJoinResponse
func (*MatchmakingJoinResponse) Decode ¶
func (s *MatchmakingJoinResponse) Decode(d *jx.Decoder) error
Decode decodes MatchmakingJoinResponse from json.
func (*MatchmakingJoinResponse) Encode ¶
func (s *MatchmakingJoinResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*MatchmakingJoinResponse) GetStatus ¶
func (s *MatchmakingJoinResponse) GetStatus() OptMatchmakingJoinResponseStatus
GetStatus returns the value of Status.
func (*MatchmakingJoinResponse) MarshalJSON ¶
func (s *MatchmakingJoinResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MatchmakingJoinResponse) SetStatus ¶
func (s *MatchmakingJoinResponse) SetStatus(val OptMatchmakingJoinResponseStatus)
SetStatus sets the value of Status.
func (*MatchmakingJoinResponse) UnmarshalJSON ¶
func (s *MatchmakingJoinResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*MatchmakingJoinResponse) Validate ¶
func (s *MatchmakingJoinResponse) Validate() error
type MatchmakingJoinResponseStatus ¶
type MatchmakingJoinResponseStatus string
Queue status after joining.
const (
MatchmakingJoinResponseStatusQueued MatchmakingJoinResponseStatus = "queued"
)
func (MatchmakingJoinResponseStatus) AllValues ¶
func (MatchmakingJoinResponseStatus) AllValues() []MatchmakingJoinResponseStatus
AllValues returns all MatchmakingJoinResponseStatus values.
func (*MatchmakingJoinResponseStatus) Decode ¶
func (s *MatchmakingJoinResponseStatus) Decode(d *jx.Decoder) error
Decode decodes MatchmakingJoinResponseStatus from json.
func (MatchmakingJoinResponseStatus) Encode ¶
func (s MatchmakingJoinResponseStatus) Encode(e *jx.Encoder)
Encode encodes MatchmakingJoinResponseStatus as json.
func (MatchmakingJoinResponseStatus) MarshalJSON ¶
func (s MatchmakingJoinResponseStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (MatchmakingJoinResponseStatus) MarshalText ¶
func (s MatchmakingJoinResponseStatus) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*MatchmakingJoinResponseStatus) UnmarshalJSON ¶
func (s *MatchmakingJoinResponseStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*MatchmakingJoinResponseStatus) UnmarshalText ¶
func (s *MatchmakingJoinResponseStatus) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (MatchmakingJoinResponseStatus) Validate ¶
func (s MatchmakingJoinResponseStatus) Validate() error
type MatchmakingJoinUnauthorized ¶
type MatchmakingJoinUnauthorized ErrorResponse
func (*MatchmakingJoinUnauthorized) Decode ¶
func (s *MatchmakingJoinUnauthorized) Decode(d *jx.Decoder) error
Decode decodes MatchmakingJoinUnauthorized from json.
func (*MatchmakingJoinUnauthorized) Encode ¶
func (s *MatchmakingJoinUnauthorized) Encode(e *jx.Encoder)
Encode encodes MatchmakingJoinUnauthorized as json.
func (*MatchmakingJoinUnauthorized) MarshalJSON ¶
func (s *MatchmakingJoinUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MatchmakingJoinUnauthorized) UnmarshalJSON ¶
func (s *MatchmakingJoinUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type MatchmakingLeaveInternalServerError ¶
type MatchmakingLeaveInternalServerError ErrorResponse
func (*MatchmakingLeaveInternalServerError) Decode ¶
func (s *MatchmakingLeaveInternalServerError) Decode(d *jx.Decoder) error
Decode decodes MatchmakingLeaveInternalServerError from json.
func (*MatchmakingLeaveInternalServerError) Encode ¶
func (s *MatchmakingLeaveInternalServerError) Encode(e *jx.Encoder)
Encode encodes MatchmakingLeaveInternalServerError as json.
func (*MatchmakingLeaveInternalServerError) MarshalJSON ¶
func (s *MatchmakingLeaveInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MatchmakingLeaveInternalServerError) UnmarshalJSON ¶
func (s *MatchmakingLeaveInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type MatchmakingLeaveNoContent ¶
type MatchmakingLeaveNoContent struct{}
MatchmakingLeaveNoContent is response for MatchmakingLeave operation.
type MatchmakingLeaveRes ¶
type MatchmakingLeaveRes interface {
// contains filtered or unexported methods
}
type MatchmakingLeaveUnauthorized ¶
type MatchmakingLeaveUnauthorized ErrorResponse
func (*MatchmakingLeaveUnauthorized) Decode ¶
func (s *MatchmakingLeaveUnauthorized) Decode(d *jx.Decoder) error
Decode decodes MatchmakingLeaveUnauthorized from json.
func (*MatchmakingLeaveUnauthorized) Encode ¶
func (s *MatchmakingLeaveUnauthorized) Encode(e *jx.Encoder)
Encode encodes MatchmakingLeaveUnauthorized as json.
func (*MatchmakingLeaveUnauthorized) MarshalJSON ¶
func (s *MatchmakingLeaveUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MatchmakingLeaveUnauthorized) UnmarshalJSON ¶
func (s *MatchmakingLeaveUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type MoveGameBadRequest ¶
type MoveGameBadRequest ErrorResponse
func (*MoveGameBadRequest) Decode ¶
func (s *MoveGameBadRequest) Decode(d *jx.Decoder) error
Decode decodes MoveGameBadRequest from json.
func (*MoveGameBadRequest) Encode ¶
func (s *MoveGameBadRequest) Encode(e *jx.Encoder)
Encode encodes MoveGameBadRequest as json.
func (*MoveGameBadRequest) MarshalJSON ¶
func (s *MoveGameBadRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MoveGameBadRequest) UnmarshalJSON ¶
func (s *MoveGameBadRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type MoveGameConflict ¶
type MoveGameConflict ErrorResponse
func (*MoveGameConflict) Decode ¶
func (s *MoveGameConflict) Decode(d *jx.Decoder) error
Decode decodes MoveGameConflict from json.
func (*MoveGameConflict) Encode ¶
func (s *MoveGameConflict) Encode(e *jx.Encoder)
Encode encodes MoveGameConflict as json.
func (*MoveGameConflict) MarshalJSON ¶
func (s *MoveGameConflict) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MoveGameConflict) UnmarshalJSON ¶
func (s *MoveGameConflict) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type MoveGameForbidden ¶
type MoveGameForbidden ErrorResponse
func (*MoveGameForbidden) Decode ¶
func (s *MoveGameForbidden) Decode(d *jx.Decoder) error
Decode decodes MoveGameForbidden from json.
func (*MoveGameForbidden) Encode ¶
func (s *MoveGameForbidden) Encode(e *jx.Encoder)
Encode encodes MoveGameForbidden as json.
func (*MoveGameForbidden) MarshalJSON ¶
func (s *MoveGameForbidden) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MoveGameForbidden) UnmarshalJSON ¶
func (s *MoveGameForbidden) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type MoveGameInternalServerError ¶
type MoveGameInternalServerError ErrorResponse
func (*MoveGameInternalServerError) Decode ¶
func (s *MoveGameInternalServerError) Decode(d *jx.Decoder) error
Decode decodes MoveGameInternalServerError from json.
func (*MoveGameInternalServerError) Encode ¶
func (s *MoveGameInternalServerError) Encode(e *jx.Encoder)
Encode encodes MoveGameInternalServerError as json.
func (*MoveGameInternalServerError) MarshalJSON ¶
func (s *MoveGameInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MoveGameInternalServerError) UnmarshalJSON ¶
func (s *MoveGameInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type MoveGameNotFound ¶
type MoveGameNotFound ErrorResponse
func (*MoveGameNotFound) Decode ¶
func (s *MoveGameNotFound) Decode(d *jx.Decoder) error
Decode decodes MoveGameNotFound from json.
func (*MoveGameNotFound) Encode ¶
func (s *MoveGameNotFound) Encode(e *jx.Encoder)
Encode encodes MoveGameNotFound as json.
func (*MoveGameNotFound) MarshalJSON ¶
func (s *MoveGameNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MoveGameNotFound) UnmarshalJSON ¶
func (s *MoveGameNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type MoveGameParams ¶
MoveGameParams is parameters of moveGame operation.
type MoveGameRes ¶
type MoveGameRes interface {
// contains filtered or unexported methods
}
type MoveGameUnauthorized ¶
type MoveGameUnauthorized ErrorResponse
func (*MoveGameUnauthorized) Decode ¶
func (s *MoveGameUnauthorized) Decode(d *jx.Decoder) error
Decode decodes MoveGameUnauthorized from json.
func (*MoveGameUnauthorized) Encode ¶
func (s *MoveGameUnauthorized) Encode(e *jx.Encoder)
Encode encodes MoveGameUnauthorized as json.
func (*MoveGameUnauthorized) MarshalJSON ¶
func (s *MoveGameUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MoveGameUnauthorized) UnmarshalJSON ¶
func (s *MoveGameUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type MoveRequest ¶
type MoveRequest struct {
NewLetter MoveRequestNewLetter `json:"new_letter"`
WordPath []BoardCell `json:"word_path"`
}
Ref: #/components/schemas/MoveRequest
func (*MoveRequest) Decode ¶
func (s *MoveRequest) Decode(d *jx.Decoder) error
Decode decodes MoveRequest from json.
func (*MoveRequest) Encode ¶
func (s *MoveRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*MoveRequest) GetNewLetter ¶
func (s *MoveRequest) GetNewLetter() MoveRequestNewLetter
GetNewLetter returns the value of NewLetter.
func (*MoveRequest) GetWordPath ¶
func (s *MoveRequest) GetWordPath() []BoardCell
GetWordPath returns the value of WordPath.
func (*MoveRequest) MarshalJSON ¶
func (s *MoveRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MoveRequest) SetNewLetter ¶
func (s *MoveRequest) SetNewLetter(val MoveRequestNewLetter)
SetNewLetter sets the value of NewLetter.
func (*MoveRequest) SetWordPath ¶
func (s *MoveRequest) SetWordPath(val []BoardCell)
SetWordPath sets the value of WordPath.
func (*MoveRequest) UnmarshalJSON ¶
func (s *MoveRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*MoveRequest) Validate ¶
func (s *MoveRequest) Validate() error
type MoveRequestNewLetter ¶
type MoveRequestNewLetter struct {
Row int `json:"row"`
Col int `json:"col"`
// Single Cyrillic letter to place.
Char string `json:"char"`
}
func (*MoveRequestNewLetter) Decode ¶
func (s *MoveRequestNewLetter) Decode(d *jx.Decoder) error
Decode decodes MoveRequestNewLetter from json.
func (*MoveRequestNewLetter) Encode ¶
func (s *MoveRequestNewLetter) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*MoveRequestNewLetter) GetChar ¶
func (s *MoveRequestNewLetter) GetChar() string
GetChar returns the value of Char.
func (*MoveRequestNewLetter) GetCol ¶
func (s *MoveRequestNewLetter) GetCol() int
GetCol returns the value of Col.
func (*MoveRequestNewLetter) GetRow ¶
func (s *MoveRequestNewLetter) GetRow() int
GetRow returns the value of Row.
func (*MoveRequestNewLetter) MarshalJSON ¶
func (s *MoveRequestNewLetter) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MoveRequestNewLetter) SetChar ¶
func (s *MoveRequestNewLetter) SetChar(val string)
SetChar sets the value of Char.
func (*MoveRequestNewLetter) SetCol ¶
func (s *MoveRequestNewLetter) SetCol(val int)
SetCol sets the value of Col.
func (*MoveRequestNewLetter) SetRow ¶
func (s *MoveRequestNewLetter) SetRow(val int)
SetRow sets the value of Row.
func (*MoveRequestNewLetter) UnmarshalJSON ¶
func (s *MoveRequestNewLetter) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*MoveRequestNewLetter) Validate ¶
func (s *MoveRequestNewLetter) Validate() error
type MoveResponse ¶
type MoveResponse struct {
// Updated 5x5 board state.
Board [][]string `json:"board"`
// ID of the player whose turn it is now.
CurrentTurnUID OptUUID `json:"current_turn_uid"`
Players []PlayerGameState `json:"players"`
Status OptGameStatus `json:"status"`
MoveNumber OptInt `json:"move_number"`
}
Ref: #/components/schemas/MoveResponse
func (*MoveResponse) Decode ¶
func (s *MoveResponse) Decode(d *jx.Decoder) error
Decode decodes MoveResponse from json.
func (*MoveResponse) Encode ¶
func (s *MoveResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*MoveResponse) GetBoard ¶
func (s *MoveResponse) GetBoard() [][]string
GetBoard returns the value of Board.
func (*MoveResponse) GetCurrentTurnUID ¶
func (s *MoveResponse) GetCurrentTurnUID() OptUUID
GetCurrentTurnUID returns the value of CurrentTurnUID.
func (*MoveResponse) GetMoveNumber ¶
func (s *MoveResponse) GetMoveNumber() OptInt
GetMoveNumber returns the value of MoveNumber.
func (*MoveResponse) GetPlayers ¶
func (s *MoveResponse) GetPlayers() []PlayerGameState
GetPlayers returns the value of Players.
func (*MoveResponse) GetStatus ¶
func (s *MoveResponse) GetStatus() OptGameStatus
GetStatus returns the value of Status.
func (*MoveResponse) MarshalJSON ¶
func (s *MoveResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MoveResponse) SetBoard ¶
func (s *MoveResponse) SetBoard(val [][]string)
SetBoard sets the value of Board.
func (*MoveResponse) SetCurrentTurnUID ¶
func (s *MoveResponse) SetCurrentTurnUID(val OptUUID)
SetCurrentTurnUID sets the value of CurrentTurnUID.
func (*MoveResponse) SetMoveNumber ¶
func (s *MoveResponse) SetMoveNumber(val OptInt)
SetMoveNumber sets the value of MoveNumber.
func (*MoveResponse) SetPlayers ¶
func (s *MoveResponse) SetPlayers(val []PlayerGameState)
SetPlayers sets the value of Players.
func (*MoveResponse) SetStatus ¶
func (s *MoveResponse) SetStatus(val OptGameStatus)
SetStatus sets the value of Status.
func (*MoveResponse) UnmarshalJSON ¶
func (s *MoveResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*MoveResponse) Validate ¶
func (s *MoveResponse) Validate() error
type OperationName ¶
type OperationName = string
OperationName is the ogen operation name
const ( AcceptEndGameOperation OperationName = "AcceptEndGame" AuthOperation OperationName = "Auth" AuthTelegramOperation OperationName = "AuthTelegram" CreateGameOperation OperationName = "CreateGame" CreateGameWithBotOperation OperationName = "CreateGameWithBot" GetConfigOperation OperationName = "GetConfig" GetLeaderboardOperation OperationName = "GetLeaderboard" GetPlayerAchievementsOperation OperationName = "GetPlayerAchievements" GetPlayerStateUIDOperation OperationName = "GetPlayerStateUID" GetPlayerStatsOperation OperationName = "GetPlayerStats" JoinGameOperation OperationName = "JoinGame" LeaveGameOperation OperationName = "LeaveGame" ListGamesOperation OperationName = "ListGames" LogoutOperation OperationName = "Logout" MatchmakingJoinOperation OperationName = "MatchmakingJoin" MatchmakingLeaveOperation OperationName = "MatchmakingLeave" MoveGameOperation OperationName = "MoveGame" PingOperation OperationName = "Ping" ProposeEndGameOperation OperationName = "ProposeEndGame" RefreshTokenOperation OperationName = "RefreshToken" RejectEndGameOperation OperationName = "RejectEndGame" SignupOperation OperationName = "Signup" SkipGameOperation OperationName = "SkipGame" )
type OptAchievementID ¶
type OptAchievementID struct {
Value AchievementID
Set bool
}
OptAchievementID is optional AchievementID.
func NewOptAchievementID ¶
func NewOptAchievementID(v AchievementID) OptAchievementID
NewOptAchievementID returns new OptAchievementID with value set to v.
func (*OptAchievementID) Decode ¶
func (o *OptAchievementID) Decode(d *jx.Decoder) error
Decode decodes AchievementID from json.
func (OptAchievementID) Encode ¶
func (o OptAchievementID) Encode(e *jx.Encoder)
Encode encodes AchievementID as json.
func (OptAchievementID) Get ¶
func (o OptAchievementID) Get() (v AchievementID, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptAchievementID) IsSet ¶
func (o OptAchievementID) IsSet() bool
IsSet returns true if OptAchievementID was set.
func (OptAchievementID) MarshalJSON ¶
func (s OptAchievementID) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptAchievementID) Or ¶
func (o OptAchievementID) Or(d AchievementID) AchievementID
Or returns value if set, or given parameter if does not.
func (*OptAchievementID) SetTo ¶
func (o *OptAchievementID) SetTo(v AchievementID)
SetTo sets value to v.
func (*OptAchievementID) UnmarshalJSON ¶
func (s *OptAchievementID) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptActiveGame ¶
type OptActiveGame struct {
Value ActiveGame
Set bool
}
OptActiveGame is optional ActiveGame.
func NewOptActiveGame ¶
func NewOptActiveGame(v ActiveGame) OptActiveGame
NewOptActiveGame returns new OptActiveGame with value set to v.
func (*OptActiveGame) Decode ¶
func (o *OptActiveGame) Decode(d *jx.Decoder) error
Decode decodes ActiveGame from json.
func (OptActiveGame) Encode ¶
func (o OptActiveGame) Encode(e *jx.Encoder)
Encode encodes ActiveGame as json.
func (OptActiveGame) Get ¶
func (o OptActiveGame) Get() (v ActiveGame, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptActiveGame) IsSet ¶
func (o OptActiveGame) IsSet() bool
IsSet returns true if OptActiveGame was set.
func (OptActiveGame) MarshalJSON ¶
func (s OptActiveGame) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptActiveGame) Or ¶
func (o OptActiveGame) Or(d ActiveGame) ActiveGame
Or returns value if set, or given parameter if does not.
func (*OptActiveGame) UnmarshalJSON ¶
func (s *OptActiveGame) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptBool ¶
OptBool is optional bool.
func NewOptBool ¶
NewOptBool returns new OptBool with value set to v.
func (OptBool) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptBool) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptFloat64 ¶
OptFloat64 is optional float64.
func NewOptFloat64 ¶
func NewOptFloat64(v float64) OptFloat64
NewOptFloat64 returns new OptFloat64 with value set to v.
func (*OptFloat64) Decode ¶
func (o *OptFloat64) Decode(d *jx.Decoder) error
Decode decodes float64 from json.
func (OptFloat64) Encode ¶
func (o OptFloat64) Encode(e *jx.Encoder)
Encode encodes float64 as json.
func (OptFloat64) Get ¶
func (o OptFloat64) Get() (v float64, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptFloat64) IsSet ¶
func (o OptFloat64) IsSet() bool
IsSet returns true if OptFloat64 was set.
func (OptFloat64) MarshalJSON ¶
func (s OptFloat64) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptFloat64) Or ¶
func (o OptFloat64) Or(d float64) float64
Or returns value if set, or given parameter if does not.
func (*OptFloat64) UnmarshalJSON ¶
func (s *OptFloat64) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptGameStatus ¶
type OptGameStatus struct {
Value GameStatus
Set bool
}
OptGameStatus is optional GameStatus.
func NewOptGameStatus ¶
func NewOptGameStatus(v GameStatus) OptGameStatus
NewOptGameStatus returns new OptGameStatus with value set to v.
func (*OptGameStatus) Decode ¶
func (o *OptGameStatus) Decode(d *jx.Decoder) error
Decode decodes GameStatus from json.
func (OptGameStatus) Encode ¶
func (o OptGameStatus) Encode(e *jx.Encoder)
Encode encodes GameStatus as json.
func (OptGameStatus) Get ¶
func (o OptGameStatus) Get() (v GameStatus, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptGameStatus) IsSet ¶
func (o OptGameStatus) IsSet() bool
IsSet returns true if OptGameStatus was set.
func (OptGameStatus) MarshalJSON ¶
func (s OptGameStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptGameStatus) Or ¶
func (o OptGameStatus) Or(d GameStatus) GameStatus
Or returns value if set, or given parameter if does not.
func (*OptGameStatus) UnmarshalJSON ¶
func (s *OptGameStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptGameSummary ¶
type OptGameSummary struct {
Value GameSummary
Set bool
}
OptGameSummary is optional GameSummary.
func NewOptGameSummary ¶
func NewOptGameSummary(v GameSummary) OptGameSummary
NewOptGameSummary returns new OptGameSummary with value set to v.
func (*OptGameSummary) Decode ¶
func (o *OptGameSummary) Decode(d *jx.Decoder) error
Decode decodes GameSummary from json.
func (OptGameSummary) Encode ¶
func (o OptGameSummary) Encode(e *jx.Encoder)
Encode encodes GameSummary as json.
func (OptGameSummary) Get ¶
func (o OptGameSummary) Get() (v GameSummary, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptGameSummary) IsSet ¶
func (o OptGameSummary) IsSet() bool
IsSet returns true if OptGameSummary was set.
func (OptGameSummary) MarshalJSON ¶
func (s OptGameSummary) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptGameSummary) Or ¶
func (o OptGameSummary) Or(d GameSummary) GameSummary
Or returns value if set, or given parameter if does not.
func (*OptGameSummary) UnmarshalJSON ¶
func (s *OptGameSummary) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptGetLeaderboardSort ¶
type OptGetLeaderboardSort struct {
Value GetLeaderboardSort
Set bool
}
OptGetLeaderboardSort is optional GetLeaderboardSort.
func NewOptGetLeaderboardSort ¶
func NewOptGetLeaderboardSort(v GetLeaderboardSort) OptGetLeaderboardSort
NewOptGetLeaderboardSort returns new OptGetLeaderboardSort with value set to v.
func (OptGetLeaderboardSort) Get ¶
func (o OptGetLeaderboardSort) Get() (v GetLeaderboardSort, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptGetLeaderboardSort) IsSet ¶
func (o OptGetLeaderboardSort) IsSet() bool
IsSet returns true if OptGetLeaderboardSort was set.
func (OptGetLeaderboardSort) Or ¶
func (o OptGetLeaderboardSort) Or(d GetLeaderboardSort) GetLeaderboardSort
Or returns value if set, or given parameter if does not.
func (*OptGetLeaderboardSort) SetTo ¶
func (o *OptGetLeaderboardSort) SetTo(v GetLeaderboardSort)
SetTo sets value to v.
type OptInt ¶
OptInt is optional int.
func (OptInt) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptInt) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptInt64 ¶
OptInt64 is optional int64.
func NewOptInt64 ¶
NewOptInt64 returns new OptInt64 with value set to v.
func (OptInt64) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptInt64) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptLeaderboardResponsePeriod ¶
type OptLeaderboardResponsePeriod struct {
Value LeaderboardResponsePeriod
Set bool
}
OptLeaderboardResponsePeriod is optional LeaderboardResponsePeriod.
func NewOptLeaderboardResponsePeriod ¶
func NewOptLeaderboardResponsePeriod(v LeaderboardResponsePeriod) OptLeaderboardResponsePeriod
NewOptLeaderboardResponsePeriod returns new OptLeaderboardResponsePeriod with value set to v.
func (*OptLeaderboardResponsePeriod) Decode ¶
func (o *OptLeaderboardResponsePeriod) Decode(d *jx.Decoder) error
Decode decodes LeaderboardResponsePeriod from json.
func (OptLeaderboardResponsePeriod) Encode ¶
func (o OptLeaderboardResponsePeriod) Encode(e *jx.Encoder)
Encode encodes LeaderboardResponsePeriod as json.
func (OptLeaderboardResponsePeriod) Get ¶
func (o OptLeaderboardResponsePeriod) Get() (v LeaderboardResponsePeriod, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptLeaderboardResponsePeriod) IsSet ¶
func (o OptLeaderboardResponsePeriod) IsSet() bool
IsSet returns true if OptLeaderboardResponsePeriod was set.
func (OptLeaderboardResponsePeriod) MarshalJSON ¶
func (s OptLeaderboardResponsePeriod) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*OptLeaderboardResponsePeriod) Reset ¶
func (o *OptLeaderboardResponsePeriod) Reset()
Reset unsets value.
func (*OptLeaderboardResponsePeriod) SetTo ¶
func (o *OptLeaderboardResponsePeriod) SetTo(v LeaderboardResponsePeriod)
SetTo sets value to v.
func (*OptLeaderboardResponsePeriod) UnmarshalJSON ¶
func (s *OptLeaderboardResponsePeriod) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptLeaderboardResponseSort ¶
type OptLeaderboardResponseSort struct {
Value LeaderboardResponseSort
Set bool
}
OptLeaderboardResponseSort is optional LeaderboardResponseSort.
func NewOptLeaderboardResponseSort ¶
func NewOptLeaderboardResponseSort(v LeaderboardResponseSort) OptLeaderboardResponseSort
NewOptLeaderboardResponseSort returns new OptLeaderboardResponseSort with value set to v.
func (*OptLeaderboardResponseSort) Decode ¶
func (o *OptLeaderboardResponseSort) Decode(d *jx.Decoder) error
Decode decodes LeaderboardResponseSort from json.
func (OptLeaderboardResponseSort) Encode ¶
func (o OptLeaderboardResponseSort) Encode(e *jx.Encoder)
Encode encodes LeaderboardResponseSort as json.
func (OptLeaderboardResponseSort) Get ¶
func (o OptLeaderboardResponseSort) Get() (v LeaderboardResponseSort, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptLeaderboardResponseSort) IsSet ¶
func (o OptLeaderboardResponseSort) IsSet() bool
IsSet returns true if OptLeaderboardResponseSort was set.
func (OptLeaderboardResponseSort) MarshalJSON ¶
func (s OptLeaderboardResponseSort) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*OptLeaderboardResponseSort) Reset ¶
func (o *OptLeaderboardResponseSort) Reset()
Reset unsets value.
func (*OptLeaderboardResponseSort) SetTo ¶
func (o *OptLeaderboardResponseSort) SetTo(v LeaderboardResponseSort)
SetTo sets value to v.
func (*OptLeaderboardResponseSort) UnmarshalJSON ¶
func (s *OptLeaderboardResponseSort) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptLogoutRequest ¶
type OptLogoutRequest struct {
Value LogoutRequest
Set bool
}
OptLogoutRequest is optional LogoutRequest.
func NewOptLogoutRequest ¶
func NewOptLogoutRequest(v LogoutRequest) OptLogoutRequest
NewOptLogoutRequest returns new OptLogoutRequest with value set to v.
func (*OptLogoutRequest) Decode ¶
func (o *OptLogoutRequest) Decode(d *jx.Decoder) error
Decode decodes LogoutRequest from json.
func (OptLogoutRequest) Encode ¶
func (o OptLogoutRequest) Encode(e *jx.Encoder)
Encode encodes LogoutRequest as json.
func (OptLogoutRequest) Get ¶
func (o OptLogoutRequest) Get() (v LogoutRequest, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptLogoutRequest) IsSet ¶
func (o OptLogoutRequest) IsSet() bool
IsSet returns true if OptLogoutRequest was set.
func (OptLogoutRequest) MarshalJSON ¶
func (s OptLogoutRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptLogoutRequest) Or ¶
func (o OptLogoutRequest) Or(d LogoutRequest) LogoutRequest
Or returns value if set, or given parameter if does not.
func (*OptLogoutRequest) SetTo ¶
func (o *OptLogoutRequest) SetTo(v LogoutRequest)
SetTo sets value to v.
func (*OptLogoutRequest) UnmarshalJSON ¶
func (s *OptLogoutRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptMatchmakingJoinResponseStatus ¶
type OptMatchmakingJoinResponseStatus struct {
Value MatchmakingJoinResponseStatus
Set bool
}
OptMatchmakingJoinResponseStatus is optional MatchmakingJoinResponseStatus.
func NewOptMatchmakingJoinResponseStatus ¶
func NewOptMatchmakingJoinResponseStatus(v MatchmakingJoinResponseStatus) OptMatchmakingJoinResponseStatus
NewOptMatchmakingJoinResponseStatus returns new OptMatchmakingJoinResponseStatus with value set to v.
func (*OptMatchmakingJoinResponseStatus) Decode ¶
func (o *OptMatchmakingJoinResponseStatus) Decode(d *jx.Decoder) error
Decode decodes MatchmakingJoinResponseStatus from json.
func (OptMatchmakingJoinResponseStatus) Encode ¶
func (o OptMatchmakingJoinResponseStatus) Encode(e *jx.Encoder)
Encode encodes MatchmakingJoinResponseStatus as json.
func (OptMatchmakingJoinResponseStatus) Get ¶
func (o OptMatchmakingJoinResponseStatus) Get() (v MatchmakingJoinResponseStatus, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptMatchmakingJoinResponseStatus) IsSet ¶
func (o OptMatchmakingJoinResponseStatus) IsSet() bool
IsSet returns true if OptMatchmakingJoinResponseStatus was set.
func (OptMatchmakingJoinResponseStatus) MarshalJSON ¶
func (s OptMatchmakingJoinResponseStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptMatchmakingJoinResponseStatus) Or ¶
func (o OptMatchmakingJoinResponseStatus) Or(d MatchmakingJoinResponseStatus) MatchmakingJoinResponseStatus
Or returns value if set, or given parameter if does not.
func (*OptMatchmakingJoinResponseStatus) Reset ¶
func (o *OptMatchmakingJoinResponseStatus) Reset()
Reset unsets value.
func (*OptMatchmakingJoinResponseStatus) SetTo ¶
func (o *OptMatchmakingJoinResponseStatus) SetTo(v MatchmakingJoinResponseStatus)
SetTo sets value to v.
func (*OptMatchmakingJoinResponseStatus) UnmarshalJSON ¶
func (s *OptMatchmakingJoinResponseStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptPlayer ¶
OptPlayer is optional Player.
func NewOptPlayer ¶
NewOptPlayer returns new OptPlayer with value set to v.
func (OptPlayer) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptPlayer) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptString ¶
OptString is optional string.
func NewOptString ¶
NewOptString returns new OptString with value set to v.
func (OptString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptUUID ¶
OptUUID is optional uuid.UUID.
func NewOptUUID ¶
NewOptUUID returns new OptUUID with value set to v.
func (OptUUID) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptUUID) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Option ¶
type Option interface {
ServerOption
ClientOption
}
Option is config option.
func WithAttributes ¶
WithAttributes specifies default otel attributes.
func WithMeterProvider ¶
func WithMeterProvider(provider metric.MeterProvider) Option
WithMeterProvider specifies a meter provider to use for creating a meter.
If none is specified, the otel.GetMeterProvider() is used.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer.
If none is specified, the global provider is used.
type PingNoContent ¶
PingNoContent is response for Ping operation.
func (*PingNoContent) GetXRequestID ¶
func (s *PingNoContent) GetXRequestID() OptInt64
GetXRequestID returns the value of XRequestID.
func (*PingNoContent) GetXServerTime ¶
func (s *PingNoContent) GetXServerTime() OptInt64
GetXServerTime returns the value of XServerTime.
func (*PingNoContent) SetXRequestID ¶
func (s *PingNoContent) SetXRequestID(val OptInt64)
SetXRequestID sets the value of XRequestID.
func (*PingNoContent) SetXServerTime ¶
func (s *PingNoContent) SetXServerTime(val OptInt64)
SetXServerTime sets the value of XServerTime.
func (*PingNoContent) Validate ¶
func (s *PingNoContent) Validate() error
type PingParams ¶
type PingParams struct {
XRequestID int64
}
PingParams is parameters of ping operation.
type Player ¶
type Player struct {
// Player's ID in the system.
UID OptUUID `json:"uid"`
// Player's first name.
Firstname OptString `json:"firstname"`
// Player's last name.
Lastname OptString `json:"lastname"`
// Player's total EXP.
Exp OptInt64 `json:"exp"`
// Player's ELO rating.
Rating OptInt64 `json:"rating"`
}
Ref: #/components/schemas/Player
func (*Player) GetFirstname ¶
GetFirstname returns the value of Firstname.
func (*Player) GetLastname ¶
GetLastname returns the value of Lastname.
func (*Player) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Player) SetFirstname ¶
SetFirstname sets the value of Firstname.
func (*Player) SetLastname ¶
SetLastname sets the value of Lastname.
func (*Player) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type PlayerAchievementsResponse ¶
type PlayerAchievementsResponse struct {
// Full list of achievements with unlocked status.
Achievements []Achievement `json:"achievements"`
}
Ref: #/components/schemas/PlayerAchievementsResponse
func (*PlayerAchievementsResponse) Decode ¶
func (s *PlayerAchievementsResponse) Decode(d *jx.Decoder) error
Decode decodes PlayerAchievementsResponse from json.
func (*PlayerAchievementsResponse) Encode ¶
func (s *PlayerAchievementsResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PlayerAchievementsResponse) GetAchievements ¶
func (s *PlayerAchievementsResponse) GetAchievements() []Achievement
GetAchievements returns the value of Achievements.
func (*PlayerAchievementsResponse) MarshalJSON ¶
func (s *PlayerAchievementsResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PlayerAchievementsResponse) SetAchievements ¶
func (s *PlayerAchievementsResponse) SetAchievements(val []Achievement)
SetAchievements sets the value of Achievements.
func (*PlayerAchievementsResponse) UnmarshalJSON ¶
func (s *PlayerAchievementsResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*PlayerAchievementsResponse) Validate ¶
func (s *PlayerAchievementsResponse) Validate() error
type PlayerGameState ¶
type PlayerGameState struct {
// Player's ID.
UID OptUUID `json:"uid"`
// Player's total EXP at the time of the event.
Exp OptInt64 `json:"exp"`
// Player's ELO rating at the time of the event.
Rating OptInt64 `json:"rating"`
// EXP earned in this game (only present in game_over events).
ExpGained OptInt `json:"exp_gained"`
// Number of points scored in the current game.
Score OptInt `json:"score"`
// Number of words submitted by the player.
WordsCount OptInt `json:"words_count"`
// List of words submitted by the player in this game.
Words []string `json:"words"`
}
Ref: #/components/schemas/PlayerGameState
func (*PlayerGameState) Decode ¶
func (s *PlayerGameState) Decode(d *jx.Decoder) error
Decode decodes PlayerGameState from json.
func (*PlayerGameState) Encode ¶
func (s *PlayerGameState) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PlayerGameState) GetExp ¶
func (s *PlayerGameState) GetExp() OptInt64
GetExp returns the value of Exp.
func (*PlayerGameState) GetExpGained ¶
func (s *PlayerGameState) GetExpGained() OptInt
GetExpGained returns the value of ExpGained.
func (*PlayerGameState) GetRating ¶
func (s *PlayerGameState) GetRating() OptInt64
GetRating returns the value of Rating.
func (*PlayerGameState) GetScore ¶
func (s *PlayerGameState) GetScore() OptInt
GetScore returns the value of Score.
func (*PlayerGameState) GetUID ¶
func (s *PlayerGameState) GetUID() OptUUID
GetUID returns the value of UID.
func (*PlayerGameState) GetWords ¶
func (s *PlayerGameState) GetWords() []string
GetWords returns the value of Words.
func (*PlayerGameState) GetWordsCount ¶
func (s *PlayerGameState) GetWordsCount() OptInt
GetWordsCount returns the value of WordsCount.
func (*PlayerGameState) MarshalJSON ¶
func (s *PlayerGameState) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PlayerGameState) SetExp ¶
func (s *PlayerGameState) SetExp(val OptInt64)
SetExp sets the value of Exp.
func (*PlayerGameState) SetExpGained ¶
func (s *PlayerGameState) SetExpGained(val OptInt)
SetExpGained sets the value of ExpGained.
func (*PlayerGameState) SetRating ¶
func (s *PlayerGameState) SetRating(val OptInt64)
SetRating sets the value of Rating.
func (*PlayerGameState) SetScore ¶
func (s *PlayerGameState) SetScore(val OptInt)
SetScore sets the value of Score.
func (*PlayerGameState) SetUID ¶
func (s *PlayerGameState) SetUID(val OptUUID)
SetUID sets the value of UID.
func (*PlayerGameState) SetWords ¶
func (s *PlayerGameState) SetWords(val []string)
SetWords sets the value of Words.
func (*PlayerGameState) SetWordsCount ¶
func (s *PlayerGameState) SetWordsCount(val OptInt)
SetWordsCount sets the value of WordsCount.
func (*PlayerGameState) UnmarshalJSON ¶
func (s *PlayerGameState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type PlayerState ¶
type PlayerState struct {
// Player's ID in the system.
UID OptUUID `json:"uid"`
// Generated nickname in the system.
Nickname OptString `json:"nickname"`
// Player's exp points in the system.
Exp OptInt64 `json:"exp"`
// Player's ELO rating in the system.
Rating OptInt64 `json:"rating"`
// Player's lives count in the system.
Lives OptInt64 `json:"lives"`
// Some Player's flags.
Flags OptInt64 `json:"flags"`
// Game's ID (if game_id empty or absent then player in the lobby).
GameID OptUUID `json:"game_id"`
}
Ref: #/components/schemas/PlayerState
func (*PlayerState) Decode ¶
func (s *PlayerState) Decode(d *jx.Decoder) error
Decode decodes PlayerState from json.
func (*PlayerState) Encode ¶
func (s *PlayerState) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PlayerState) GetExp ¶
func (s *PlayerState) GetExp() OptInt64
GetExp returns the value of Exp.
func (*PlayerState) GetFlags ¶
func (s *PlayerState) GetFlags() OptInt64
GetFlags returns the value of Flags.
func (*PlayerState) GetGameID ¶
func (s *PlayerState) GetGameID() OptUUID
GetGameID returns the value of GameID.
func (*PlayerState) GetLives ¶
func (s *PlayerState) GetLives() OptInt64
GetLives returns the value of Lives.
func (*PlayerState) GetNickname ¶
func (s *PlayerState) GetNickname() OptString
GetNickname returns the value of Nickname.
func (*PlayerState) GetRating ¶
func (s *PlayerState) GetRating() OptInt64
GetRating returns the value of Rating.
func (*PlayerState) GetUID ¶
func (s *PlayerState) GetUID() OptUUID
GetUID returns the value of UID.
func (*PlayerState) MarshalJSON ¶
func (s *PlayerState) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PlayerState) SetExp ¶
func (s *PlayerState) SetExp(val OptInt64)
SetExp sets the value of Exp.
func (*PlayerState) SetFlags ¶
func (s *PlayerState) SetFlags(val OptInt64)
SetFlags sets the value of Flags.
func (*PlayerState) SetGameID ¶
func (s *PlayerState) SetGameID(val OptUUID)
SetGameID sets the value of GameID.
func (*PlayerState) SetLives ¶
func (s *PlayerState) SetLives(val OptInt64)
SetLives sets the value of Lives.
func (*PlayerState) SetNickname ¶
func (s *PlayerState) SetNickname(val OptString)
SetNickname sets the value of Nickname.
func (*PlayerState) SetRating ¶
func (s *PlayerState) SetRating(val OptInt64)
SetRating sets the value of Rating.
func (*PlayerState) SetUID ¶
func (s *PlayerState) SetUID(val OptUUID)
SetUID sets the value of UID.
func (*PlayerState) UnmarshalJSON ¶
func (s *PlayerState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type PlayerStatsResponse ¶
type PlayerStatsResponse struct {
// Total number of finished games.
GamesPlayed OptInt64 `json:"games_played"`
// Number of games won.
Wins OptInt64 `json:"wins"`
// Number of games lost.
Losses OptInt64 `json:"losses"`
// Number of games ended in a draw.
Draws OptInt64 `json:"draws"`
// Win rate as a fraction (0..1).
WinRate OptFloat64 `json:"win_rate"`
// Average length of submitted words in letters.
AvgWordLength OptFloat64 `json:"avg_word_length"`
// Longest word ever submitted (empty if no games with recorded words).
BestWord OptString `json:"best_word"`
// Most frequently used letter across all submitted words (empty if none).
FavoriteLetter OptString `json:"favorite_letter"`
}
Ref: #/components/schemas/PlayerStatsResponse
func (*PlayerStatsResponse) Decode ¶
func (s *PlayerStatsResponse) Decode(d *jx.Decoder) error
Decode decodes PlayerStatsResponse from json.
func (*PlayerStatsResponse) Encode ¶
func (s *PlayerStatsResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PlayerStatsResponse) GetAvgWordLength ¶
func (s *PlayerStatsResponse) GetAvgWordLength() OptFloat64
GetAvgWordLength returns the value of AvgWordLength.
func (*PlayerStatsResponse) GetBestWord ¶
func (s *PlayerStatsResponse) GetBestWord() OptString
GetBestWord returns the value of BestWord.
func (*PlayerStatsResponse) GetDraws ¶
func (s *PlayerStatsResponse) GetDraws() OptInt64
GetDraws returns the value of Draws.
func (*PlayerStatsResponse) GetFavoriteLetter ¶
func (s *PlayerStatsResponse) GetFavoriteLetter() OptString
GetFavoriteLetter returns the value of FavoriteLetter.
func (*PlayerStatsResponse) GetGamesPlayed ¶
func (s *PlayerStatsResponse) GetGamesPlayed() OptInt64
GetGamesPlayed returns the value of GamesPlayed.
func (*PlayerStatsResponse) GetLosses ¶
func (s *PlayerStatsResponse) GetLosses() OptInt64
GetLosses returns the value of Losses.
func (*PlayerStatsResponse) GetWinRate ¶
func (s *PlayerStatsResponse) GetWinRate() OptFloat64
GetWinRate returns the value of WinRate.
func (*PlayerStatsResponse) GetWins ¶
func (s *PlayerStatsResponse) GetWins() OptInt64
GetWins returns the value of Wins.
func (*PlayerStatsResponse) MarshalJSON ¶
func (s *PlayerStatsResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PlayerStatsResponse) SetAvgWordLength ¶
func (s *PlayerStatsResponse) SetAvgWordLength(val OptFloat64)
SetAvgWordLength sets the value of AvgWordLength.
func (*PlayerStatsResponse) SetBestWord ¶
func (s *PlayerStatsResponse) SetBestWord(val OptString)
SetBestWord sets the value of BestWord.
func (*PlayerStatsResponse) SetDraws ¶
func (s *PlayerStatsResponse) SetDraws(val OptInt64)
SetDraws sets the value of Draws.
func (*PlayerStatsResponse) SetFavoriteLetter ¶
func (s *PlayerStatsResponse) SetFavoriteLetter(val OptString)
SetFavoriteLetter sets the value of FavoriteLetter.
func (*PlayerStatsResponse) SetGamesPlayed ¶
func (s *PlayerStatsResponse) SetGamesPlayed(val OptInt64)
SetGamesPlayed sets the value of GamesPlayed.
func (*PlayerStatsResponse) SetLosses ¶
func (s *PlayerStatsResponse) SetLosses(val OptInt64)
SetLosses sets the value of Losses.
func (*PlayerStatsResponse) SetWinRate ¶
func (s *PlayerStatsResponse) SetWinRate(val OptFloat64)
SetWinRate sets the value of WinRate.
func (*PlayerStatsResponse) SetWins ¶
func (s *PlayerStatsResponse) SetWins(val OptInt64)
SetWins sets the value of Wins.
func (*PlayerStatsResponse) UnmarshalJSON ¶
func (s *PlayerStatsResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*PlayerStatsResponse) Validate ¶
func (s *PlayerStatsResponse) Validate() error
type ProposeEndGameConflict ¶
type ProposeEndGameConflict ErrorResponse
func (*ProposeEndGameConflict) Decode ¶
func (s *ProposeEndGameConflict) Decode(d *jx.Decoder) error
Decode decodes ProposeEndGameConflict from json.
func (*ProposeEndGameConflict) Encode ¶
func (s *ProposeEndGameConflict) Encode(e *jx.Encoder)
Encode encodes ProposeEndGameConflict as json.
func (*ProposeEndGameConflict) MarshalJSON ¶
func (s *ProposeEndGameConflict) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ProposeEndGameConflict) UnmarshalJSON ¶
func (s *ProposeEndGameConflict) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ProposeEndGameForbidden ¶
type ProposeEndGameForbidden ErrorResponse
func (*ProposeEndGameForbidden) Decode ¶
func (s *ProposeEndGameForbidden) Decode(d *jx.Decoder) error
Decode decodes ProposeEndGameForbidden from json.
func (*ProposeEndGameForbidden) Encode ¶
func (s *ProposeEndGameForbidden) Encode(e *jx.Encoder)
Encode encodes ProposeEndGameForbidden as json.
func (*ProposeEndGameForbidden) MarshalJSON ¶
func (s *ProposeEndGameForbidden) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ProposeEndGameForbidden) UnmarshalJSON ¶
func (s *ProposeEndGameForbidden) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ProposeEndGameNoContent ¶
type ProposeEndGameNoContent struct{}
ProposeEndGameNoContent is response for ProposeEndGame operation.
type ProposeEndGameNotFound ¶
type ProposeEndGameNotFound ErrorResponse
func (*ProposeEndGameNotFound) Decode ¶
func (s *ProposeEndGameNotFound) Decode(d *jx.Decoder) error
Decode decodes ProposeEndGameNotFound from json.
func (*ProposeEndGameNotFound) Encode ¶
func (s *ProposeEndGameNotFound) Encode(e *jx.Encoder)
Encode encodes ProposeEndGameNotFound as json.
func (*ProposeEndGameNotFound) MarshalJSON ¶
func (s *ProposeEndGameNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ProposeEndGameNotFound) UnmarshalJSON ¶
func (s *ProposeEndGameNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ProposeEndGameParams ¶
ProposeEndGameParams is parameters of proposeEndGame operation.
type ProposeEndGameRes ¶
type ProposeEndGameRes interface {
// contains filtered or unexported methods
}
type ProposeEndGameUnauthorized ¶
type ProposeEndGameUnauthorized ErrorResponse
func (*ProposeEndGameUnauthorized) Decode ¶
func (s *ProposeEndGameUnauthorized) Decode(d *jx.Decoder) error
Decode decodes ProposeEndGameUnauthorized from json.
func (*ProposeEndGameUnauthorized) Encode ¶
func (s *ProposeEndGameUnauthorized) Encode(e *jx.Encoder)
Encode encodes ProposeEndGameUnauthorized as json.
func (*ProposeEndGameUnauthorized) MarshalJSON ¶
func (s *ProposeEndGameUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ProposeEndGameUnauthorized) UnmarshalJSON ¶
func (s *ProposeEndGameUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type RefreshRequest ¶
type RefreshRequest struct {
// The opaque refresh token previously issued.
RefreshToken string `json:"refresh_token"`
}
Ref: #/components/schemas/RefreshRequest
func (*RefreshRequest) Decode ¶
func (s *RefreshRequest) Decode(d *jx.Decoder) error
Decode decodes RefreshRequest from json.
func (*RefreshRequest) Encode ¶
func (s *RefreshRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*RefreshRequest) GetRefreshToken ¶
func (s *RefreshRequest) GetRefreshToken() string
GetRefreshToken returns the value of RefreshToken.
func (*RefreshRequest) MarshalJSON ¶
func (s *RefreshRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*RefreshRequest) SetRefreshToken ¶
func (s *RefreshRequest) SetRefreshToken(val string)
SetRefreshToken sets the value of RefreshToken.
func (*RefreshRequest) UnmarshalJSON ¶
func (s *RefreshRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type RefreshResponse ¶
type RefreshResponse struct {
// New short-lived JWT access token.
AccessToken OptString `json:"access_token"`
// New opaque refresh token (rotated; the old one is now invalid).
RefreshToken OptString `json:"refresh_token"`
// Always "Bearer".
TokenType OptString `json:"token_type"`
// Access token lifetime in seconds.
ExpiresIn OptInt `json:"expires_in"`
}
Ref: #/components/schemas/RefreshResponse
func (*RefreshResponse) Decode ¶
func (s *RefreshResponse) Decode(d *jx.Decoder) error
Decode decodes RefreshResponse from json.
func (*RefreshResponse) Encode ¶
func (s *RefreshResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*RefreshResponse) GetAccessToken ¶
func (s *RefreshResponse) GetAccessToken() OptString
GetAccessToken returns the value of AccessToken.
func (*RefreshResponse) GetExpiresIn ¶
func (s *RefreshResponse) GetExpiresIn() OptInt
GetExpiresIn returns the value of ExpiresIn.
func (*RefreshResponse) GetRefreshToken ¶
func (s *RefreshResponse) GetRefreshToken() OptString
GetRefreshToken returns the value of RefreshToken.
func (*RefreshResponse) GetTokenType ¶
func (s *RefreshResponse) GetTokenType() OptString
GetTokenType returns the value of TokenType.
func (*RefreshResponse) MarshalJSON ¶
func (s *RefreshResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*RefreshResponse) SetAccessToken ¶
func (s *RefreshResponse) SetAccessToken(val OptString)
SetAccessToken sets the value of AccessToken.
func (*RefreshResponse) SetExpiresIn ¶
func (s *RefreshResponse) SetExpiresIn(val OptInt)
SetExpiresIn sets the value of ExpiresIn.
func (*RefreshResponse) SetRefreshToken ¶
func (s *RefreshResponse) SetRefreshToken(val OptString)
SetRefreshToken sets the value of RefreshToken.
func (*RefreshResponse) SetTokenType ¶
func (s *RefreshResponse) SetTokenType(val OptString)
SetTokenType sets the value of TokenType.
func (*RefreshResponse) UnmarshalJSON ¶
func (s *RefreshResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type RefreshTokenRes ¶
type RefreshTokenRes interface {
// contains filtered or unexported methods
}
type RejectEndGameConflict ¶
type RejectEndGameConflict ErrorResponse
func (*RejectEndGameConflict) Decode ¶
func (s *RejectEndGameConflict) Decode(d *jx.Decoder) error
Decode decodes RejectEndGameConflict from json.
func (*RejectEndGameConflict) Encode ¶
func (s *RejectEndGameConflict) Encode(e *jx.Encoder)
Encode encodes RejectEndGameConflict as json.
func (*RejectEndGameConflict) MarshalJSON ¶
func (s *RejectEndGameConflict) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*RejectEndGameConflict) UnmarshalJSON ¶
func (s *RejectEndGameConflict) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type RejectEndGameForbidden ¶
type RejectEndGameForbidden ErrorResponse
func (*RejectEndGameForbidden) Decode ¶
func (s *RejectEndGameForbidden) Decode(d *jx.Decoder) error
Decode decodes RejectEndGameForbidden from json.
func (*RejectEndGameForbidden) Encode ¶
func (s *RejectEndGameForbidden) Encode(e *jx.Encoder)
Encode encodes RejectEndGameForbidden as json.
func (*RejectEndGameForbidden) MarshalJSON ¶
func (s *RejectEndGameForbidden) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*RejectEndGameForbidden) UnmarshalJSON ¶
func (s *RejectEndGameForbidden) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type RejectEndGameNoContent ¶
type RejectEndGameNoContent struct{}
RejectEndGameNoContent is response for RejectEndGame operation.
type RejectEndGameNotFound ¶
type RejectEndGameNotFound ErrorResponse
func (*RejectEndGameNotFound) Decode ¶
func (s *RejectEndGameNotFound) Decode(d *jx.Decoder) error
Decode decodes RejectEndGameNotFound from json.
func (*RejectEndGameNotFound) Encode ¶
func (s *RejectEndGameNotFound) Encode(e *jx.Encoder)
Encode encodes RejectEndGameNotFound as json.
func (*RejectEndGameNotFound) MarshalJSON ¶
func (s *RejectEndGameNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*RejectEndGameNotFound) UnmarshalJSON ¶
func (s *RejectEndGameNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type RejectEndGameParams ¶
RejectEndGameParams is parameters of rejectEndGame operation.
type RejectEndGameRes ¶
type RejectEndGameRes interface {
// contains filtered or unexported methods
}
type RejectEndGameUnauthorized ¶
type RejectEndGameUnauthorized ErrorResponse
func (*RejectEndGameUnauthorized) Decode ¶
func (s *RejectEndGameUnauthorized) Decode(d *jx.Decoder) error
Decode decodes RejectEndGameUnauthorized from json.
func (*RejectEndGameUnauthorized) Encode ¶
func (s *RejectEndGameUnauthorized) Encode(e *jx.Encoder)
Encode encodes RejectEndGameUnauthorized as json.
func (*RejectEndGameUnauthorized) MarshalJSON ¶
func (s *RejectEndGameUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*RejectEndGameUnauthorized) UnmarshalJSON ¶
func (s *RejectEndGameUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationGroup ¶
OperationGroup returns the x-ogen-operation-group value.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
type SecurityHandler ¶
type SecurityHandler interface {
// HandleBearerAuth handles BearerAuth security.
HandleBearerAuth(ctx context.Context, operationName OperationName, t BearerAuth) (context.Context, error)
}
SecurityHandler is handler for security parameters.
type SecuritySource ¶
type SecuritySource interface {
// BearerAuth provides BearerAuth security value.
BearerAuth(ctx context.Context, operationName OperationName) (BearerAuth, error)
}
SecuritySource is provider of security values (tokens, passwords, etc.).
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.
func NewServer ¶
func NewServer(h Handler, sec SecurityHandler, opts ...ServerOption) (*Server, error)
NewServer creates new Server.
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
ServerOption is server config option.
func WithErrorHandler ¶
func WithErrorHandler(h ErrorHandler) ServerOption
WithErrorHandler specifies error handler to use.
func WithMaxMultipartMemory ¶
func WithMaxMultipartMemory(max int64) ServerOption
WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.
func WithMethodNotAllowed ¶
func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
WithMethodNotAllowed specifies Method Not Allowed handler to use.
func WithMiddleware ¶
func WithMiddleware(m ...Middleware) ServerOption
WithMiddleware specifies middlewares to use.
func WithNotFound ¶
func WithNotFound(notFound http.HandlerFunc) ServerOption
WithNotFound specifies Not Found handler to use.
func WithPathPrefix ¶
func WithPathPrefix(prefix string) ServerOption
WithPathPrefix specifies server path prefix.
type SignupRequest ¶
type SignupRequest struct {
// User's first name.
Firstname string `json:"firstname"`
// User's last name.
Lastname string `json:"lastname"`
// User's email.
Email string `json:"email"`
// User's password.
Password string `json:"password"`
}
Ref: #/components/schemas/SignupRequest
func (*SignupRequest) Decode ¶
func (s *SignupRequest) Decode(d *jx.Decoder) error
Decode decodes SignupRequest from json.
func (*SignupRequest) Encode ¶
func (s *SignupRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*SignupRequest) GetEmail ¶
func (s *SignupRequest) GetEmail() string
GetEmail returns the value of Email.
func (*SignupRequest) GetFirstname ¶
func (s *SignupRequest) GetFirstname() string
GetFirstname returns the value of Firstname.
func (*SignupRequest) GetLastname ¶
func (s *SignupRequest) GetLastname() string
GetLastname returns the value of Lastname.
func (*SignupRequest) GetPassword ¶
func (s *SignupRequest) GetPassword() string
GetPassword returns the value of Password.
func (*SignupRequest) MarshalJSON ¶
func (s *SignupRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SignupRequest) SetEmail ¶
func (s *SignupRequest) SetEmail(val string)
SetEmail sets the value of Email.
func (*SignupRequest) SetFirstname ¶
func (s *SignupRequest) SetFirstname(val string)
SetFirstname sets the value of Firstname.
func (*SignupRequest) SetLastname ¶
func (s *SignupRequest) SetLastname(val string)
SetLastname sets the value of Lastname.
func (*SignupRequest) SetPassword ¶
func (s *SignupRequest) SetPassword(val string)
SetPassword sets the value of Password.
func (*SignupRequest) UnmarshalJSON ¶
func (s *SignupRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*SignupRequest) Validate ¶
func (s *SignupRequest) Validate() error
type SignupResponse ¶
type SignupResponse struct {
User OptPlayer `json:"user"`
// Short-lived JWT access token (Authorization: Bearer).
AccessToken OptString `json:"access_token"`
// Opaque long-lived token used to obtain a new access token.
RefreshToken OptString `json:"refresh_token"`
// Always "Bearer".
TokenType OptString `json:"token_type"`
// Access token lifetime in seconds.
ExpiresIn OptInt `json:"expires_in"`
// JWT for connecting to the Centrifugo WebSocket.
CentrifugoToken OptString `json:"centrifugo_token"`
// Centrifugo subscription JWT for the lobby channel.
LobbyToken OptString `json:"lobby_token"`
}
Ref: #/components/schemas/SignupResponse
func (*SignupResponse) Decode ¶
func (s *SignupResponse) Decode(d *jx.Decoder) error
Decode decodes SignupResponse from json.
func (*SignupResponse) Encode ¶
func (s *SignupResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*SignupResponse) GetAccessToken ¶
func (s *SignupResponse) GetAccessToken() OptString
GetAccessToken returns the value of AccessToken.
func (*SignupResponse) GetCentrifugoToken ¶
func (s *SignupResponse) GetCentrifugoToken() OptString
GetCentrifugoToken returns the value of CentrifugoToken.
func (*SignupResponse) GetExpiresIn ¶
func (s *SignupResponse) GetExpiresIn() OptInt
GetExpiresIn returns the value of ExpiresIn.
func (*SignupResponse) GetLobbyToken ¶
func (s *SignupResponse) GetLobbyToken() OptString
GetLobbyToken returns the value of LobbyToken.
func (*SignupResponse) GetRefreshToken ¶
func (s *SignupResponse) GetRefreshToken() OptString
GetRefreshToken returns the value of RefreshToken.
func (*SignupResponse) GetTokenType ¶
func (s *SignupResponse) GetTokenType() OptString
GetTokenType returns the value of TokenType.
func (*SignupResponse) GetUser ¶
func (s *SignupResponse) GetUser() OptPlayer
GetUser returns the value of User.
func (*SignupResponse) MarshalJSON ¶
func (s *SignupResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SignupResponse) SetAccessToken ¶
func (s *SignupResponse) SetAccessToken(val OptString)
SetAccessToken sets the value of AccessToken.
func (*SignupResponse) SetCentrifugoToken ¶
func (s *SignupResponse) SetCentrifugoToken(val OptString)
SetCentrifugoToken sets the value of CentrifugoToken.
func (*SignupResponse) SetExpiresIn ¶
func (s *SignupResponse) SetExpiresIn(val OptInt)
SetExpiresIn sets the value of ExpiresIn.
func (*SignupResponse) SetLobbyToken ¶
func (s *SignupResponse) SetLobbyToken(val OptString)
SetLobbyToken sets the value of LobbyToken.
func (*SignupResponse) SetRefreshToken ¶
func (s *SignupResponse) SetRefreshToken(val OptString)
SetRefreshToken sets the value of RefreshToken.
func (*SignupResponse) SetTokenType ¶
func (s *SignupResponse) SetTokenType(val OptString)
SetTokenType sets the value of TokenType.
func (*SignupResponse) SetUser ¶
func (s *SignupResponse) SetUser(val OptPlayer)
SetUser sets the value of User.
func (*SignupResponse) UnmarshalJSON ¶
func (s *SignupResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type SkipGameConflict ¶
type SkipGameConflict ErrorResponse
func (*SkipGameConflict) Decode ¶
func (s *SkipGameConflict) Decode(d *jx.Decoder) error
Decode decodes SkipGameConflict from json.
func (*SkipGameConflict) Encode ¶
func (s *SkipGameConflict) Encode(e *jx.Encoder)
Encode encodes SkipGameConflict as json.
func (*SkipGameConflict) MarshalJSON ¶
func (s *SkipGameConflict) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SkipGameConflict) UnmarshalJSON ¶
func (s *SkipGameConflict) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type SkipGameForbidden ¶
type SkipGameForbidden ErrorResponse
func (*SkipGameForbidden) Decode ¶
func (s *SkipGameForbidden) Decode(d *jx.Decoder) error
Decode decodes SkipGameForbidden from json.
func (*SkipGameForbidden) Encode ¶
func (s *SkipGameForbidden) Encode(e *jx.Encoder)
Encode encodes SkipGameForbidden as json.
func (*SkipGameForbidden) MarshalJSON ¶
func (s *SkipGameForbidden) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SkipGameForbidden) UnmarshalJSON ¶
func (s *SkipGameForbidden) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type SkipGameNoContent ¶
type SkipGameNoContent struct{}
SkipGameNoContent is response for SkipGame operation.
type SkipGameNotFound ¶
type SkipGameNotFound ErrorResponse
func (*SkipGameNotFound) Decode ¶
func (s *SkipGameNotFound) Decode(d *jx.Decoder) error
Decode decodes SkipGameNotFound from json.
func (*SkipGameNotFound) Encode ¶
func (s *SkipGameNotFound) Encode(e *jx.Encoder)
Encode encodes SkipGameNotFound as json.
func (*SkipGameNotFound) MarshalJSON ¶
func (s *SkipGameNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SkipGameNotFound) UnmarshalJSON ¶
func (s *SkipGameNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type SkipGameParams ¶
SkipGameParams is parameters of skipGame operation.
type SkipGameRes ¶
type SkipGameRes interface {
// contains filtered or unexported methods
}
type SkipGameUnauthorized ¶
type SkipGameUnauthorized ErrorResponse
func (*SkipGameUnauthorized) Decode ¶
func (s *SkipGameUnauthorized) Decode(d *jx.Decoder) error
Decode decodes SkipGameUnauthorized from json.
func (*SkipGameUnauthorized) Encode ¶
func (s *SkipGameUnauthorized) Encode(e *jx.Encoder)
Encode encodes SkipGameUnauthorized as json.
func (*SkipGameUnauthorized) MarshalJSON ¶
func (s *SkipGameUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SkipGameUnauthorized) UnmarshalJSON ¶
func (s *SkipGameUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type TelegramAuthRequest ¶
type TelegramAuthRequest struct {
// Raw init data string provided by the Telegram WebView (window.Telegram.WebApp.initData).
InitData string `json:"init_data"`
}
Ref: #/components/schemas/TelegramAuthRequest
func (*TelegramAuthRequest) Decode ¶
func (s *TelegramAuthRequest) Decode(d *jx.Decoder) error
Decode decodes TelegramAuthRequest from json.
func (*TelegramAuthRequest) Encode ¶
func (s *TelegramAuthRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*TelegramAuthRequest) GetInitData ¶
func (s *TelegramAuthRequest) GetInitData() string
GetInitData returns the value of InitData.
func (*TelegramAuthRequest) MarshalJSON ¶
func (s *TelegramAuthRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*TelegramAuthRequest) SetInitData ¶
func (s *TelegramAuthRequest) SetInitData(val string)
SetInitData sets the value of InitData.
func (*TelegramAuthRequest) UnmarshalJSON ¶
func (s *TelegramAuthRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) AcceptEndGame ¶
func (UnimplementedHandler) AcceptEndGame(ctx context.Context, params AcceptEndGameParams) (r AcceptEndGameRes, _ error)
AcceptEndGame implements acceptEndGame operation.
The opponent accepts the end-game proposal. The game ends immediately with the current scores. Only the non-proposing player may call this.
POST /games/{id}/accept-end
func (UnimplementedHandler) Auth ¶
func (UnimplementedHandler) Auth(ctx context.Context, req *AuthRequest) (r AuthRes, _ error)
Auth implements auth operation.
Auth request.
POST /auth
func (UnimplementedHandler) AuthTelegram ¶
func (UnimplementedHandler) AuthTelegram(ctx context.Context, req *TelegramAuthRequest) (r AuthTelegramRes, _ error)
AuthTelegram implements authTelegram operation.
Validates the signed init data produced by the Telegram WebView against the bot token, then logs in an existing user or creates a new one linked to their Telegram account.
POST /auth/telegram
func (UnimplementedHandler) CreateGame ¶
func (UnimplementedHandler) CreateGame(ctx context.Context) (r CreateGameRes, _ error)
CreateGame implements createGame operation.
Create a new game.
POST /games
func (UnimplementedHandler) CreateGameWithBot ¶
func (UnimplementedHandler) CreateGameWithBot(ctx context.Context) (r CreateGameWithBotRes, _ error)
CreateGameWithBot implements createGameWithBot operation.
Creates a new game where the authenticated player plays against a server-side bot. The game starts immediately and the first move belongs to the human player.
POST /games/with-bot
func (UnimplementedHandler) GetConfig ¶
func (UnimplementedHandler) GetConfig(ctx context.Context) (r *ConfigResponse, _ error)
GetConfig implements getConfig operation.
Returns feature flags the client needs before authentication, e.g. whether email/password registration is available.
GET /config
func (UnimplementedHandler) GetLeaderboard ¶
func (UnimplementedHandler) GetLeaderboard(ctx context.Context, params GetLeaderboardParams) (r GetLeaderboardRes, _ error)
GetLeaderboard implements getLeaderboard operation.
Returns the top players by current rating or total EXP who were active during the requested period. Results are cached for 5 minutes.
GET /leaderboard
func (UnimplementedHandler) GetPlayerAchievements ¶
func (UnimplementedHandler) GetPlayerAchievements(ctx context.Context) (r GetPlayerAchievementsRes, _ error)
GetPlayerAchievements implements getPlayerAchievements operation.
Returns the full list of achievements with their unlocked status for the currently authenticated player.
GET /player/achievements
func (UnimplementedHandler) GetPlayerStateUID ¶
func (UnimplementedHandler) GetPlayerStateUID(ctx context.Context, params GetPlayerStateUIDParams) (r GetPlayerStateUIDRes, _ error)
GetPlayerStateUID implements getPlayerStateUID operation.
Get user state.
GET /player/state/{uid}
func (UnimplementedHandler) GetPlayerStats ¶
func (UnimplementedHandler) GetPlayerStats(ctx context.Context) (r GetPlayerStatsRes, _ error)
GetPlayerStats implements getPlayerStats operation.
Returns lifetime aggregated statistics for the currently authenticated player: games played, wins/losses/draws, win rate, average word length, best word and favorite letter.
GET /player/stats
func (UnimplementedHandler) JoinGame ¶
func (UnimplementedHandler) JoinGame(ctx context.Context, params JoinGameParams) (r JoinGameRes, _ error)
JoinGame implements joinGame operation.
Adds the authenticated player to the specified waiting game. When the second player joins (quorum of 2 is reached) the game transitions to in_progress and the first move belongs to the player who created the game.
POST /games/{id}/join
func (UnimplementedHandler) LeaveGame ¶
func (UnimplementedHandler) LeaveGame(ctx context.Context, params LeaveGameParams) (r LeaveGameRes, _ error)
LeaveGame implements leaveGame operation.
Removes the player from a game in waiting status. If the game becomes empty, it is deleted. In-progress games cannot be left this way.
POST /games/{id}/leave
func (UnimplementedHandler) ListGames ¶
func (UnimplementedHandler) ListGames(ctx context.Context) (r ListGamesRes, _ error)
ListGames implements listGames operation.
Returns a snapshot of all currently active games.
GET /games
func (UnimplementedHandler) Logout ¶
func (UnimplementedHandler) Logout(ctx context.Context, req OptLogoutRequest) (r LogoutRes, _ error)
Logout implements logout operation.
Revoke the current refresh token.
POST /auth/logout
func (UnimplementedHandler) MatchmakingJoin ¶
func (UnimplementedHandler) MatchmakingJoin(ctx context.Context) (r MatchmakingJoinRes, _ error)
MatchmakingJoin implements matchmakingJoin operation.
Enqueues the player for quick matchmaking. When a human opponent with a close rating is found, a match_found event is published to the lobby channel; after a timeout the server starts a bot game.
POST /matchmaking/join
func (UnimplementedHandler) MatchmakingLeave ¶
func (UnimplementedHandler) MatchmakingLeave(ctx context.Context) (r MatchmakingLeaveRes, _ error)
MatchmakingLeave implements matchmakingLeave operation.
Idempotent — leaving without being queued is not an error.
POST /matchmaking/leave
func (UnimplementedHandler) MoveGame ¶
func (UnimplementedHandler) MoveGame(ctx context.Context, req *MoveRequest, params MoveGameParams) (r MoveGameRes, _ error)
MoveGame implements moveGame operation.
Places a new letter on the board and submits a word. If the word is valid, the player's score is updated and the turn passes to the opponent.
POST /games/{id}/move
func (UnimplementedHandler) Ping ¶
func (UnimplementedHandler) Ping(ctx context.Context, params PingParams) (r PingRes, _ error)
Ping implements ping operation.
POST not GET — mutates session TTL. Returns 204 with X-Server-Time header instead of a JSON body to minimize bandwidth on frequent pings (every ping_delay ms).
POST /session/ping
func (UnimplementedHandler) ProposeEndGame ¶
func (UnimplementedHandler) ProposeEndGame(ctx context.Context, params ProposeEndGameParams) (r ProposeEndGameRes, _ error)
ProposeEndGame implements proposeEndGame operation.
The current player proposes to end the game (e.g. no valid moves are available). The turn timer is paused until the opponent responds. Only the player whose turn it currently is may call this.
POST /games/{id}/propose-end
func (UnimplementedHandler) RefreshToken ¶
func (UnimplementedHandler) RefreshToken(ctx context.Context, req *RefreshRequest) (r RefreshTokenRes, _ error)
RefreshToken implements refreshToken operation.
Exchange a refresh token for a new access/refresh pair.
POST /auth/refresh
func (UnimplementedHandler) RejectEndGame ¶
func (UnimplementedHandler) RejectEndGame(ctx context.Context, params RejectEndGameParams) (r RejectEndGameRes, _ error)
RejectEndGame implements rejectEndGame operation.
The opponent rejects the end-game proposal. The game resumes with the remaining turn time (minimum 10 seconds). Only the non-proposing player may call this.
POST /games/{id}/reject-end
func (UnimplementedHandler) Signup ¶
func (UnimplementedHandler) Signup(ctx context.Context, req *SignupRequest) (r SignupRes, _ error)
Signup implements signup operation.
Sign-up request.
POST /signup
func (UnimplementedHandler) SkipGame ¶
func (UnimplementedHandler) SkipGame(ctx context.Context, params SkipGameParams) (r SkipGameRes, _ error)
SkipGame implements skipGame operation.
Ends the current turn without making a move. The turn passes to the opponent.
POST /games/{id}/skip
Source Files
¶
- generate.go
- oas_cfg_gen.go
- oas_client_gen.go
- oas_handlers_gen.go
- oas_interfaces_gen.go
- oas_json_gen.go
- oas_labeler_gen.go
- oas_middleware_gen.go
- oas_operations_gen.go
- oas_parameters_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_security_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go