7
0
gaore-common-sdk-go/services/game/game_client.go

46 lines
1.2 KiB
Go
Raw Normal View History

2025-12-17 16:55:03 +08:00
package game
import (
"fmt"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
)
type ClientInfoReq struct {
*requests.RpcRequest
}
type ClientInfoResp struct {
*responses.BaseResponse
Code int `json:"code"`
Msg string `json:"msg"`
Data []ClientInfoDataItem `json:"data"`
}
type ClientInfoDataItem struct {
Id int `json:"id"`
GameName string `json:"game_name"`
Status int `json:"status"`
Version string `json:"version"`
GameId int `json:"game_id"`
RequestDomain string `json:"request_domain"`
SpareRequestDomain string `json:"spare_request_domain"`
OtherRequestDomain string `json:"other_request_domain"`
}
func CreateClientInfoReq(status, gameId int64) *ClientInfoReq {
req := &ClientInfoReq{
&requests.RpcRequest{},
}
req.InitWithApiInfo(HOST, VERSION, fmt.Sprintf("/api/game/getGameClientInfo?game_id=%d&status=%d", gameId, status))
req.Method = requests.GET
return req
}
func CreateClientInfoResp() *ClientInfoResp {
return &ClientInfoResp{
BaseResponse: &responses.BaseResponse{},
}
}