7
0
gaore-common-sdk-go/services/game/client.go
2025-05-29 12:09:18 +08:00

71 lines
1.7 KiB
Go

package game
import (
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
)
const (
VERSION = "2025-05-28"
)
var HOST = requests.Host{
Default: "game",
}
type Client struct {
sdk.Client
}
func NewClient() (client *Client, err error) {
client = new(Client)
err = client.Init()
return
}
// GetGameOsInfo 获取游戏系统信息
func (c *Client) GetGameOsInfo(req *GetGameOsInfoReq) (resp *GetGameOsInfoResp, err error) {
resp = CreateGetGameOsInfoResp()
err = c.DoAction(req, resp)
return
}
// GetGameInfo 获取游戏信息
func (c *Client) GetGameInfo(req *GetGameInfoReq) (resp *GetGameInfoResp, err error) {
resp = CreateGetGameInfoByIdResp()
err = c.DoAction(req, resp)
return
}
func (c *Client) GetChannelInfo(req *ChannelInfoReq) (resp *ChannelInfoResp, err error) {
resp = CreateChannelInfoResp()
err = c.DoAction(req, resp)
return
}
func (c *Client) GetLoginInfoById(req *GetLoginInfoByIdReq) (resp *GetLoginInfoByIdResp, err error) {
resp = CreateGetLoginInfoByIdResp()
err = c.DoAction(req, resp)
return
}
func (c *Client) GetProtocolByGameId(req *GetProtocolByGameIdRep) (resp *GetProtocolByGameIdResp, err error) {
resp = CreateGetProtocolByGameIdResp()
err = c.DoAction(req, resp)
return
}
// GetGameSimpleList 获取子游戏简单列表
func (c *Client) GetGameSimpleList(req *GetGameSimpleListReq) (resp *GetGameSimpleListResp, err error) {
resp = CreateGetGameSimpleListResp()
err = c.DoAction(req, resp)
return
}
// GetGameServerV2 获取游戏服务器列表v2
func (c *Client) GetGameServerV2(req *GetServerV2Request) (resp *GetServerV2Response, err error) {
resp = CreateGetServerV2Response()
err = c.DoAction(req, resp)
return
}