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 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 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) CreateGame(ctx context.Context) (CreateGameRes, error)
- func (c *Client) CreateGameWithBot(ctx context.Context) (CreateGameWithBotRes, error)
- func (c *Client) GetPlayerStateUID(ctx context.Context, params GetPlayerStateUIDParams) (GetPlayerStateUIDRes, error)
- func (c *Client) JoinGame(ctx context.Context, params JoinGameParams) (JoinGameRes, error)
- func (c *Client) ListGames(ctx context.Context) (ListGamesRes, error)
- func (c *Client) Logout(ctx context.Context, request OptLogoutRequest) (LogoutRes, 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 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 GetPlayerStateUIDParams
- type GetPlayerStateUIDRes
- 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 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) GetUID() OptUUID
- func (s *LobbyPlayer) MarshalJSON() ([]byte, error)
- func (s *LobbyPlayer) SetExp(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 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 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 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 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 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 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) 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) SetUID(val OptUUID)
- func (s *Player) UnmarshalJSON(data []byte) 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) 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) 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) 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) SetUID(val OptUUID)
- func (s *PlayerState) UnmarshalJSON(data []byte) 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 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) CreateGame(ctx context.Context) (r CreateGameRes, _ error)
- func (UnimplementedHandler) CreateGameWithBot(ctx context.Context) (r CreateGameWithBotRes, _ error)
- func (UnimplementedHandler) GetPlayerStateUID(ctx context.Context, params GetPlayerStateUIDParams) (r GetPlayerStateUIDRes, _ error)
- func (UnimplementedHandler) JoinGame(ctx context.Context, params JoinGameParams) (r JoinGameRes, _ error)
- func (UnimplementedHandler) ListGames(ctx context.Context) (r ListGamesRes, _ error)
- func (UnimplementedHandler) Logout(ctx context.Context, req OptLogoutRequest) (r LogoutRes, _ 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 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 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) 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) 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) 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) 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) 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 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 GetPlayerStateUIDParams ¶
GetPlayerStateUIDParams is parameters of getPlayerStateUID operation.
type GetPlayerStateUIDRes ¶
type GetPlayerStateUIDRes interface {
// contains filtered or unexported methods
}
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)
// 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)
// GetPlayerStateUID implements getPlayerStateUID operation.
//
// Get user state.
//
// GET /player/state/{uid}
GetPlayerStateUID(ctx context.Context, params GetPlayerStateUIDParams) (GetPlayerStateUIDRes, 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)
// 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)
// 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)
// 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)
// GetPlayerStateUID invokes getPlayerStateUID operation.
//
// Get user state.
//
// GET /player/state/{uid}
GetPlayerStateUID(ctx context.Context, params GetPlayerStateUIDParams) (GetPlayerStateUIDRes, 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)
// 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)
// 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 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"`
}
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) 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) 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 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" CreateGameOperation OperationName = "CreateGame" CreateGameWithBotOperation OperationName = "CreateGameWithBot" GetPlayerStateUIDOperation OperationName = "GetPlayerStateUID" JoinGameOperation OperationName = "JoinGame" ListGamesOperation OperationName = "ListGames" LogoutOperation OperationName = "Logout" MoveGameOperation OperationName = "MoveGame" PingOperation OperationName = "Ping" ProposeEndGameOperation OperationName = "ProposeEndGame" RefreshTokenOperation OperationName = "RefreshToken" RejectEndGameOperation OperationName = "RejectEndGame" SignupOperation OperationName = "Signup" SkipGameOperation OperationName = "SkipGame" )
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 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 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 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 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"`
}
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 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"`
// 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) 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) 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 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) 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) 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 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 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) 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) 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) 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) 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) 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