46 lines
1.2 KiB
Go
46 lines
1.2 KiB
Go
|
|
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{},
|
||
|
|
}
|
||
|
|
}
|