Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) CreateSession(request *CreateSessionRequest) (response *CreateSessionResponse, err error)
- func (c *Client) DescribeInstancesCount(request *DescribeInstancesCountRequest) (response *DescribeInstancesCountResponse, err error)
- func (c *Client) SaveGameArchive(request *SaveGameArchiveRequest) (response *SaveGameArchiveResponse, err error)
- func (c *Client) StopGame(request *StopGameRequest) (response *StopGameResponse, err error)
- func (c *Client) SwitchGameArchive(request *SwitchGameArchiveRequest) (response *SwitchGameArchiveResponse, err error)
- func (c *Client) TrylockWorker(request *TrylockWorkerRequest) (response *TrylockWorkerResponse, err error)
- type CreateSessionRequest
- type CreateSessionResponse
- type DescribeInstancesCountRequest
- type DescribeInstancesCountResponse
- type SaveGameArchiveRequest
- type SaveGameArchiveResponse
- type StopGameRequest
- type StopGameResponse
- type SwitchGameArchiveRequest
- type SwitchGameArchiveResponse
- type TrylockWorkerRequest
- type TrylockWorkerResponse
Constants ¶
const APIVersion = "2019-11-18"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error)
func NewClientWithSecretId ¶
Deprecated
func (*Client) CreateSession ¶
func (c *Client) CreateSession(request *CreateSessionRequest) (response *CreateSessionResponse, err error)
创建会话
func (*Client) DescribeInstancesCount ¶
func (c *Client) DescribeInstancesCount(request *DescribeInstancesCountRequest) (response *DescribeInstancesCountResponse, err error)
获取实例总数和运行数
func (*Client) SaveGameArchive ¶
func (c *Client) SaveGameArchive(request *SaveGameArchiveRequest) (response *SaveGameArchiveResponse, err error)
保存游戏存档
func (*Client) StopGame ¶
func (c *Client) StopGame(request *StopGameRequest) (response *StopGameResponse, err error)
强制退出游戏
func (*Client) SwitchGameArchive ¶
func (c *Client) SwitchGameArchive(request *SwitchGameArchiveRequest) (response *SwitchGameArchiveResponse, err error)
切换游戏存档
func (*Client) TrylockWorker ¶
func (c *Client) TrylockWorker(request *TrylockWorkerRequest) (response *TrylockWorkerResponse, err error)
尝试锁定机器
type CreateSessionRequest ¶
type CreateSessionRequest struct { *tchttp.BaseRequest // 客户端session信息,从JSSDK请求中获得 ClientSession *string `json:"ClientSession,omitempty" name:"ClientSession"` // 游戏用户ID UserId *string `json:"UserId,omitempty" name:"UserId"` // 游戏ID GameId *string `json:"GameId,omitempty" name:"GameId"` // 【已废弃】只在TrylockWorker时生效 GameRegion *string `json:"GameRegion,omitempty" name:"GameRegion"` // 游戏参数 GameParas *string `json:"GameParas,omitempty" name:"GameParas"` // 分辨率,,可设置为1080p或720p或1920x1080格式 Resolution *string `json:"Resolution,omitempty" name:"Resolution"` // 背景图url,格式为png或jpeg,宽高1920*1080 ImageUrl *string `json:"ImageUrl,omitempty" name:"ImageUrl"` // 【已废弃】 SetNo *uint64 `json:"SetNo,omitempty" name:"SetNo"` // 单位Mbps,固定码率,有一定浮动范围,后端不动态调整(MaxBitrate和MinBitrate将无效) Bitrate *uint64 `json:"Bitrate,omitempty" name:"Bitrate"` // 单位Mbps,动态调整最大码率,有一定浮动范围 MaxBitrate *uint64 `json:"MaxBitrate,omitempty" name:"MaxBitrate"` // 单位Mbps,动态调整最小码率,有一定浮动范围 MinBitrate *uint64 `json:"MinBitrate,omitempty" name:"MinBitrate"` // 帧率,可设置为30、45、60、90、120、144 Fps *uint64 `json:"Fps,omitempty" name:"Fps"` // 【已废弃】只在TrylockWorker时生效 UserIp *string `json:"UserIp,omitempty" name:"UserIp"` // 【已废弃】优化项,便于客户灰度开启新的优化项,默认为0 Optimization *uint64 `json:"Optimization,omitempty" name:"Optimization"` // 【互动云游】游戏主机用户ID HostUserId *string `json:"HostUserId,omitempty" name:"HostUserId"` // 【互动云游】角色;Player表示玩家;Viewer表示观察者 Role *string `json:"Role,omitempty" name:"Role"` // 游戏相关参数 GameContext *string `json:"GameContext,omitempty" name:"GameContext"` }
func NewCreateSessionRequest ¶
func NewCreateSessionRequest() (request *CreateSessionRequest)
func (*CreateSessionRequest) FromJsonString ¶
func (r *CreateSessionRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*CreateSessionRequest) ToJsonString ¶
func (r *CreateSessionRequest) ToJsonString() string
type CreateSessionResponse ¶
type CreateSessionResponse struct { *tchttp.BaseResponse Response *struct { // 服务端session信息,返回给JSSDK ServerSession *string `json:"ServerSession,omitempty" name:"ServerSession"` // 【已废弃】 RoleNumber *string `json:"RoleNumber,omitempty" name:"RoleNumber"` // 【互动云游】角色;Player表示玩家;Viewer表示观察者 Role *string `json:"Role,omitempty" name:"Role"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewCreateSessionResponse ¶
func NewCreateSessionResponse() (response *CreateSessionResponse)
func (*CreateSessionResponse) FromJsonString ¶
func (r *CreateSessionResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*CreateSessionResponse) ToJsonString ¶
func (r *CreateSessionResponse) ToJsonString() string
type DescribeInstancesCountRequest ¶
type DescribeInstancesCountRequest struct { *tchttp.BaseRequest // 游戏ID GameId *string `json:"GameId,omitempty" name:"GameId"` // 实例分组ID GroupId *string `json:"GroupId,omitempty" name:"GroupId"` }
func NewDescribeInstancesCountRequest ¶
func NewDescribeInstancesCountRequest() (request *DescribeInstancesCountRequest)
func (*DescribeInstancesCountRequest) FromJsonString ¶
func (r *DescribeInstancesCountRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DescribeInstancesCountRequest) ToJsonString ¶
func (r *DescribeInstancesCountRequest) ToJsonString() string
type DescribeInstancesCountResponse ¶
type DescribeInstancesCountResponse struct { *tchttp.BaseResponse Response *struct { // 客户的实例总数 Total *uint64 `json:"Total,omitempty" name:"Total"` // 客户的实例运行数 Running *uint64 `json:"Running,omitempty" name:"Running"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewDescribeInstancesCountResponse ¶
func NewDescribeInstancesCountResponse() (response *DescribeInstancesCountResponse)
func (*DescribeInstancesCountResponse) FromJsonString ¶
func (r *DescribeInstancesCountResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*DescribeInstancesCountResponse) ToJsonString ¶
func (r *DescribeInstancesCountResponse) ToJsonString() string
type SaveGameArchiveRequest ¶
type SaveGameArchiveRequest struct { *tchttp.BaseRequest // 游戏用户ID UserId *string `json:"UserId,omitempty" name:"UserId"` // 游戏ID GameId *string `json:"GameId,omitempty" name:"GameId"` }
func NewSaveGameArchiveRequest ¶
func NewSaveGameArchiveRequest() (request *SaveGameArchiveRequest)
func (*SaveGameArchiveRequest) FromJsonString ¶
func (r *SaveGameArchiveRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*SaveGameArchiveRequest) ToJsonString ¶
func (r *SaveGameArchiveRequest) ToJsonString() string
type SaveGameArchiveResponse ¶
type SaveGameArchiveResponse struct { *tchttp.BaseResponse Response *struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewSaveGameArchiveResponse ¶
func NewSaveGameArchiveResponse() (response *SaveGameArchiveResponse)
func (*SaveGameArchiveResponse) FromJsonString ¶
func (r *SaveGameArchiveResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*SaveGameArchiveResponse) ToJsonString ¶
func (r *SaveGameArchiveResponse) ToJsonString() string
type StopGameRequest ¶
type StopGameRequest struct { *tchttp.BaseRequest // 游戏用户ID UserId *string `json:"UserId,omitempty" name:"UserId"` // 【多人游戏】游戏主机用户ID HostUserId *string `json:"HostUserId,omitempty" name:"HostUserId"` }
func NewStopGameRequest ¶
func NewStopGameRequest() (request *StopGameRequest)
func (*StopGameRequest) FromJsonString ¶
func (r *StopGameRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*StopGameRequest) ToJsonString ¶
func (r *StopGameRequest) ToJsonString() string
type StopGameResponse ¶
type StopGameResponse struct { *tchttp.BaseResponse Response *struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewStopGameResponse ¶
func NewStopGameResponse() (response *StopGameResponse)
func (*StopGameResponse) FromJsonString ¶
func (r *StopGameResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*StopGameResponse) ToJsonString ¶
func (r *StopGameResponse) ToJsonString() string
type SwitchGameArchiveRequest ¶
type SwitchGameArchiveRequest struct { *tchttp.BaseRequest // 游戏用户ID UserId *string `json:"UserId,omitempty" name:"UserId"` // 游戏ID GameId *string `json:"GameId,omitempty" name:"GameId"` // 游戏存档Url GameArchiveUrl *string `json:"GameArchiveUrl,omitempty" name:"GameArchiveUrl"` // 游戏相关参数 GameContext *string `json:"GameContext,omitempty" name:"GameContext"` }
func NewSwitchGameArchiveRequest ¶
func NewSwitchGameArchiveRequest() (request *SwitchGameArchiveRequest)
func (*SwitchGameArchiveRequest) FromJsonString ¶
func (r *SwitchGameArchiveRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*SwitchGameArchiveRequest) ToJsonString ¶
func (r *SwitchGameArchiveRequest) ToJsonString() string
type SwitchGameArchiveResponse ¶
type SwitchGameArchiveResponse struct { *tchttp.BaseResponse Response *struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewSwitchGameArchiveResponse ¶
func NewSwitchGameArchiveResponse() (response *SwitchGameArchiveResponse)
func (*SwitchGameArchiveResponse) FromJsonString ¶
func (r *SwitchGameArchiveResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*SwitchGameArchiveResponse) ToJsonString ¶
func (r *SwitchGameArchiveResponse) ToJsonString() string
type TrylockWorkerRequest ¶
type TrylockWorkerRequest struct { *tchttp.BaseRequest // 游戏用户ID UserId *string `json:"UserId,omitempty" name:"UserId"` // 游戏ID GameId *string `json:"GameId,omitempty" name:"GameId"` // 游戏区域,ap-guangzhou、ap-shanghai、ap-beijing等,如果不为空,优先按照该区域进行调度分配机器 GameRegion *string `json:"GameRegion,omitempty" name:"GameRegion"` // 【废弃】资源池编号 SetNo *uint64 `json:"SetNo,omitempty" name:"SetNo"` // 游戏用户IP,用于就近调度,例如125.127.178.228 UserIp *string `json:"UserIp,omitempty" name:"UserIp"` // 分组ID GroupId *string `json:"GroupId,omitempty" name:"GroupId"` }
func NewTrylockWorkerRequest ¶
func NewTrylockWorkerRequest() (request *TrylockWorkerRequest)
func (*TrylockWorkerRequest) FromJsonString ¶
func (r *TrylockWorkerRequest) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*TrylockWorkerRequest) ToJsonString ¶
func (r *TrylockWorkerRequest) ToJsonString() string
type TrylockWorkerResponse ¶
type TrylockWorkerResponse struct { *tchttp.BaseResponse Response *struct { // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewTrylockWorkerResponse ¶
func NewTrylockWorkerResponse() (response *TrylockWorkerResponse)
func (*TrylockWorkerResponse) FromJsonString ¶
func (r *TrylockWorkerResponse) FromJsonString(s string) error
It is highly **NOT** recommended to use this function because it has no param check, nor strict type check
func (*TrylockWorkerResponse) ToJsonString ¶
func (r *TrylockWorkerResponse) ToJsonString() string