Documentation
¶
Index ¶
- type GameCreateReqdeprecated
- type GameCreateRequest
- type GameCreateRespdeprecated
- type GameCreateResponse
- type GameDeleteReqdeprecated
- type GameDeleteRequest
- type GameDeleteRespdeprecated
- type GameDeleteResponse
- type GameDetailReqdeprecated
- type GameDetailRequest
- type GameDetailRespdeprecated
- type GameDetailResponse
- type GameEnvAddReqdeprecated
- type GameEnvAddRequest
- type GameEnvAddRespdeprecated
- type GameEnvAddResponse
- type GameEnvDeleteReqdeprecated
- type GameEnvDeleteRequest
- type GameEnvDeleteRespdeprecated
- type GameEnvDeleteResponse
- type GameEnvItem
- type GameEnvUpdateReqdeprecated
- type GameEnvUpdateRequest
- type GameEnvUpdateRespdeprecated
- type GameEnvUpdateResponse
- type GameEnvsData
- type GameEnvsListReqdeprecated
- type GameEnvsListRequest
- type GameEnvsListRespdeprecated
- type GameEnvsListResponse
- type GameInfo
- type GameUpdateReqdeprecated
- type GameUpdateRequest
- type GameUpdateRespdeprecated
- type GameUpdateResponse
- type GamesData
- type GamesListReqdeprecated
- type GamesListRequest
- type GamesListRespdeprecated
- type GamesListResponse
- type Handler
- func (h *Handler) Create(c *gin.Context)
- func (h *Handler) Delete(c *gin.Context)
- func (h *Handler) Detail(c *gin.Context)
- func (h *Handler) EnvAdd(c *gin.Context)
- func (h *Handler) EnvDelete(c *gin.Context)
- func (h *Handler) EnvUpdate(c *gin.Context)
- func (h *Handler) EnvsList(c *gin.Context)
- func (h *Handler) List(c *gin.Context)
- func (h *Handler) Update(c *gin.Context)
- type Service
- func (s *Service) Create(ctx context.Context, req *GameCreateRequest) (*GameCreateResponse, error)
- func (s *Service) Delete(ctx context.Context, req *GameDeleteRequest) error
- func (s *Service) Detail(ctx context.Context, req *GameDetailRequest) (*GameDetailResponse, error)
- func (s *Service) EnvAdd(ctx context.Context, req *GameEnvAddRequest) (*GameEnvAddResponse, error)
- func (s *Service) EnvDelete(ctx context.Context, req *GameEnvDeleteRequest) (*GameEnvDeleteResponse, error)
- func (s *Service) EnvUpdate(ctx context.Context, req *GameEnvUpdateRequest) (*GameEnvUpdateResponse, error)
- func (s *Service) EnvsList(ctx context.Context, req *GameEnvsListRequest) (*GameEnvsListResponse, error)
- func (s *Service) List(ctx context.Context, req *GamesListRequest) (*GamesListResponse, error)
- func (s *Service) Update(ctx context.Context, req *GameUpdateRequest) (*GameUpdateResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GameCreateReq
deprecated
type GameCreateReq = GameCreateRequest
Deprecated: Use GameCreateRequest directly
type GameCreateRequest ¶
type GameCreateRequest struct {
Name string `json:"name"`
AliasName string `json:"aliasName"`
Description string `json:"description"`
Config string `json:"config"`
}
GameCreateRequest represents the request to create a game
type GameCreateResp
deprecated
type GameCreateResp = GameCreateResponse
Deprecated: Use GameCreateResponse directly
type GameCreateResponse ¶
type GameCreateResponse struct {
Game GameInfo `json:"game"`
}
GameCreateResponse represents the response after creating a game
type GameDeleteReq
deprecated
type GameDeleteReq = GameDeleteRequest
Deprecated: Use GameDeleteRequest directly
type GameDeleteRequest ¶
type GameDeleteRequest struct {
ID string `uri:"id"`
}
GameDeleteRequest represents the request to delete a game
type GameDeleteResp
deprecated
type GameDeleteResp = GameDeleteResponse
Deprecated: Use GameDeleteResponse directly
type GameDeleteResponse ¶
type GameDeleteResponse struct {
Code int `json:"code"`
Message string `json:"message"`
Data interface{} `json:"data,omitempty"`
}
GameDeleteResponse represents the response after deleting a game
type GameDetailReq
deprecated
type GameDetailReq = GameDetailRequest
Deprecated: Use GameDetailRequest directly
type GameDetailRequest ¶
type GameDetailRequest struct {
ID string `uri:"id"`
}
GameDetailRequest represents the request to get game details
type GameDetailResp
deprecated
type GameDetailResp = GameDetailResponse
Deprecated: Use GameDetailResponse directly
type GameDetailResponse ¶
type GameDetailResponse struct {
Game GameInfo `json:"game"`
}
GameDetailResponse represents the response with game details
type GameEnvAddReq
deprecated
type GameEnvAddReq = GameEnvAddRequest
Deprecated: Use GameEnvAddRequest directly
type GameEnvAddRequest ¶
type GameEnvAddRequest struct {
ID string `uri:"id"`
Name string `json:"name"`
Type string `json:"type"`
}
GameEnvAddRequest represents the request to add a game environment
type GameEnvAddResp
deprecated
type GameEnvAddResp = GameEnvAddResponse
Deprecated: Use GameEnvAddResponse directly
type GameEnvAddResponse ¶
type GameEnvAddResponse struct {
Envs []GameEnvItem `json:"envs"`
}
GameEnvAddResponse represents the response after adding a game environment
type GameEnvDeleteReq
deprecated
type GameEnvDeleteReq = GameEnvDeleteRequest
Deprecated: Use GameEnvDeleteRequest directly
type GameEnvDeleteRequest ¶
GameEnvDeleteRequest represents the request to delete a game environment
type GameEnvDeleteResp
deprecated
type GameEnvDeleteResp = GameEnvDeleteResponse
Deprecated: Use GameEnvDeleteResponse directly
type GameEnvDeleteResponse ¶
type GameEnvDeleteResponse struct {
Envs []GameEnvItem `json:"envs"`
}
GameEnvDeleteResponse represents the response after deleting a game environment
type GameEnvItem ¶
type GameEnvItem struct {
Env string `json:"env"`
Description string `json:"description"`
Color string `json:"color"`
}
GameEnvItem represents a game environment
type GameEnvUpdateReq
deprecated
type GameEnvUpdateReq = GameEnvUpdateRequest
Deprecated: Use GameEnvUpdateRequest directly
type GameEnvUpdateRequest ¶
type GameEnvUpdateRequest struct {
ID string `uri:"id"`
EnvID string `uri:"envId"`
Name string `json:"name"`
Type string `json:"type"`
}
GameEnvUpdateRequest represents the request to update a game environment
type GameEnvUpdateResp
deprecated
type GameEnvUpdateResp = GameEnvUpdateResponse
Deprecated: Use GameEnvUpdateResponse directly
type GameEnvUpdateResponse ¶
type GameEnvUpdateResponse struct {
Envs []GameEnvItem `json:"envs"`
}
GameEnvUpdateResponse represents the response after updating a game environment
type GameEnvsData ¶
type GameEnvsData struct {
Envs []GameEnvItem `json:"envs"`
}
GameEnvsData represents game environments data
type GameEnvsListReq
deprecated
type GameEnvsListReq = GameEnvsListRequest
Deprecated: Use GameEnvsListRequest directly
type GameEnvsListRequest ¶
type GameEnvsListRequest struct {
ID string `uri:"id"`
}
GameEnvsListRequest represents the request to list game environments
type GameEnvsListResp
deprecated
type GameEnvsListResp = GameEnvsListResponse
Deprecated: Use GameEnvsListResponse directly
type GameEnvsListResponse ¶
type GameEnvsListResponse struct {
Envs []GameEnvItem `json:"envs"`
}
GameEnvsListResponse represents the response with game environments
type GameInfo ¶
type GameInfo struct {
ID uint `json:"id"`
Name string `json:"name"`
Icon string `json:"icon"`
Description string `json:"description"`
Enabled bool `json:"enabled"`
AliasName string `json:"aliasName"`
Homepage string `json:"homepage"`
Status string `json:"status"`
GameType string `json:"gameType"`
GenreCode string `json:"genreCode"`
Color string `json:"color"`
Envs []GameEnvItem `json:"envs"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
GameInfo represents game information
type GameUpdateReq
deprecated
type GameUpdateReq = GameUpdateRequest
Deprecated: Use GameUpdateRequest directly
type GameUpdateRequest ¶
type GameUpdateRequest struct {
ID string `uri:"id"`
Name string `json:"name"`
AliasName string `json:"aliasName"`
Description string `json:"description"`
Config string `json:"config"`
Status string `json:"status"`
}
GameUpdateRequest represents the request to update a game
type GameUpdateResp
deprecated
type GameUpdateResp = GameUpdateResponse
Deprecated: Use GameUpdateResponse directly
type GameUpdateResponse ¶
type GameUpdateResponse struct {
Game GameInfo `json:"game"`
}
GameUpdateResponse represents the response after updating a game
type GamesListReq
deprecated
type GamesListReq = GamesListRequest
Deprecated: Use GamesListRequest directly
type GamesListRequest ¶
type GamesListRequest struct {
Page int `form:"page"`
PageSize int `form:"pageSize"`
Status string `form:"status"`
}
GamesListRequest represents the request to list games
type GamesListResp
deprecated
type GamesListResp = GamesListResponse
Deprecated: Use GamesListResponse directly
type GamesListResponse ¶
type GamesListResponse struct {
Games []GameInfo `json:"games"`
Total int `json:"total"`
Page int `json:"page"`
Size int `json:"size"`
}
GamesListResponse represents the response with a list of games
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(svcCtx *svc.ServiceContext) *Service
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, req *GameCreateRequest) (*GameCreateResponse, error)
Create creates a new game
func (*Service) Delete ¶
func (s *Service) Delete(ctx context.Context, req *GameDeleteRequest) error
Delete deletes a game
func (*Service) Detail ¶
func (s *Service) Detail(ctx context.Context, req *GameDetailRequest) (*GameDetailResponse, error)
Detail retrieves details of a specific game
func (*Service) EnvAdd ¶
func (s *Service) EnvAdd(ctx context.Context, req *GameEnvAddRequest) (*GameEnvAddResponse, error)
EnvAdd adds a new environment to a game
func (*Service) EnvDelete ¶
func (s *Service) EnvDelete(ctx context.Context, req *GameEnvDeleteRequest) (*GameEnvDeleteResponse, error)
EnvDelete deletes an environment from a game
func (*Service) EnvUpdate ¶
func (s *Service) EnvUpdate(ctx context.Context, req *GameEnvUpdateRequest) (*GameEnvUpdateResponse, error)
EnvUpdate updates an existing environment in a game
func (*Service) EnvsList ¶
func (s *Service) EnvsList(ctx context.Context, req *GameEnvsListRequest) (*GameEnvsListResponse, error)
EnvsList retrieves the environments for a game
func (*Service) List ¶
func (s *Service) List(ctx context.Context, req *GamesListRequest) (*GamesListResponse, error)
List retrieves a paginated list of games
func (*Service) Update ¶
func (s *Service) Update(ctx context.Context, req *GameUpdateRequest) (*GameUpdateResponse, error)
Update updates an existing game