7
0
gaore-common-sdk-go/services/game/login.go
2025-05-07 15:44:37 +08:00

74 lines
2.5 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package game
import (
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
)
type GetLoginInfoByIdReq struct {
*requests.RpcRequest
GameId int `position:"Body" field:"game_id"`
GameVersion string `position:"Body" field:"game_version"`
Uid int `position:"Body" field:"uid"`
UserName string `position:"Body" field:"uname"`
}
type PayInfo struct {
HiddenAlipay int `json:"hide_alipay"`
HiddenWx int `json:"hide_wx"`
HiddenUnionPay int `json:"hide_union_pay"`
}
type GameVersionInfo struct {
AppName string `json:"app_name"`
AppID string `json:"app_id"`
LoginURL string `json:"login_url"`
PayURL string `json:"pay_url"`
GameURL string `json:"game_url"`
PayCallbackURL string `json:"pay_callback_url"`
IsH5Logout int `json:"is_h5_logout"`
HideWindow int `json:"hidewindow"`
GameVersion string `json:"version"`
GameSign string `json:"game_sign"`
GameSignName string `json:"game_sign_name"`
GameSignID int `json:"game_sign_id"`
IsYsdk int `json:"is_ysdk"`
Company string `json:"company"`
CompanyKf string `json:"company_kf"`
CompanyProto string `json:"company_proto"`
CompanySms string `json:"company_sms"`
KfStatus int `json:"kf_status"`
PopupTime int `json:"popup_time"`
GameId int `json:"game_id"`
ScreenType int `json:"screen_type"`
GameSwitch int `json:"game_switch"` // 根据上下文0 或 1 的整数表示布尔值
ExtData map[string]any `json:"ext_data"`
OsName string `json:"os_name"`
PayInfo PayInfo `json:"pay_info"`
}
type GetLoginInfoByIdResp struct {
*responses.BaseResponse
Code int `json:"code"`
Msg string `json:"msg"`
Data GameVersionInfo `json:"data"`
}
func CreateGetLoginInfoByIdReq(gameId int, gameVersion string) *GetLoginInfoByIdReq {
req := &GetLoginInfoByIdReq{
RpcRequest: &requests.RpcRequest{},
}
req.GameId = gameId
req.GameVersion = gameVersion
req.InitWithApiInfo(HOST, VERSION, "/api/login/getInfoById")
req.Method = requests.POST
return req
}
func CreateGetLoginInfoByIdResp() *GetLoginInfoByIdResp {
resp := &GetLoginInfoByIdResp{
BaseResponse: &responses.BaseResponse{},
}
return resp
}