api

package
v1.0.20230810 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package client

  • YuanJing OpenAPI SDK for Go * *

Package client

  • YuanJing OpenAPI SDK for Go * *

Package client

  • YuanJing OpenAPI SDK for Go * *

Package client

  • YuanJing OpenAPI SDK for Go * *

Package client

  • YuanJing OpenAPI SDK for Go * *

Package client

  • YuanJing OpenAPI SDK for Go * *

Package client

  • YuanJing OpenAPI SDK for Go * *

Package client

  • YuanJing OpenAPI SDK for Go * *

Index

Constants

View Source
const (
	Trace_Id      string = "Traceid"
	Result_Status string = "Result-Status"
)

Variables

View Source
var (
	DefaultConfiguration = NewConfiguration()
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	ConsoleAdminApi *ConsoleAdminApiService

	DispatchApi *DispatchApiService

	InteractiveApi *InteractiveApiService

	LiveApi *LiveApiService

	MultiplayApi *MultiplayApiService

	TokenApi *TokenApiService

	UsercontrollerApi *UsercontrollerApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the API In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

type Configuration

type Configuration struct {
	Host             string            `json:"host"`
	Scheme           string            `json:"scheme"`
	DefaultHeader    map[string]string `json:"defaultHeader,omitempty"`
	AccessKey        string            `json:"accessKey"`
	SecretKey        string            `json:"secretKey"`
	SignatureVersion string            `json:"signatureVersion"`
	SignatureMethod  string            `json:"signatureMethod"`
	HTTPClient       *http.Client
}

func NewConfiguration

func NewConfiguration() *Configuration

type ConsoleAdminApiService

type ConsoleAdminApiService service

func (*ConsoleAdminApiService) ActivateDeployment added in v1.0.20230410

ActivateDeployment

  • 激活已部署成功的游戏版本的部署
  • @param varForms model.ConsoleAdminActivateDeploymentForms

func (*ConsoleAdminApiService) AdaptGameVersion

AdaptGameVersion

  • 发起游戏版本适配
  • @param varForms model.ConsoleAdminAdaptGameVersionForms

func (*ConsoleAdminApiService) AddGameToProject

AddGameToProject

  • 将游戏添加到项目
  • @param varForms model.ConsoleAdminAddGameToProjectForms

func (*ConsoleAdminApiService) CreateGame

CreateGame

  • 创建游戏
  • @param varForms model.ConsoleAdminCreateGameForms

func (*ConsoleAdminApiService) CreateProject

CreateProject

  • 创建项目
  • @param varForms model.ConsoleAdminCreateProjectForms

func (*ConsoleAdminApiService) DeleteGame

DeleteGame

  • 删除指定的游戏
  • @param varForms model.ConsoleAdminDeleteGameForms

func (*ConsoleAdminApiService) DeleteGameVersion

DeleteGameVersion

  • 发起游戏版本适配
  • @param varForms model.ConsoleAdminDeleteGameVersionForms

func (*ConsoleAdminApiService) DeleteProject

DeleteProject

  • 删除指定的项目
  • @param varForms model.ConsoleAdminDeleteProjectForms

func (*ConsoleAdminApiService) GetGameVersion

GetGameVersion

  • 获取单个游戏版本信息
  • @param varForms model.ConsoleAdminGetGameVersionForms

func (*ConsoleAdminApiService) GetGameVersionProgress

GetGameVersionProgress

  • 查询版本处理进度(包含上传、适配、部署)
  • @param varForms model.ConsoleAdminGetGameVersionProgressForms

func (*ConsoleAdminApiService) ListActivateableInstances added in v1.0.20230410

ListActivateableInstances

  • 指定项目和游戏版本,获取可激活且可调度的实例及调度配置
  • @param varForms model.ConsoleAdminListActivateableInstancesForms

func (*ConsoleAdminApiService) ListActivatedInstances added in v1.0.20230410

ListActivatedInstances

  • 指定项目和游戏,获取已激活版本的可调度实例及调度配置
  • @param varForms model.ConsoleAdminListActivatedInstancesForms

func (*ConsoleAdminApiService) ListControllersOfGame added in v1.0.20230410

ListControllersOfGame

  • 获取单个游戏关联的控制器列表
  • @param varForms model.ConsoleAdminListControllersOfGameForms

func (*ConsoleAdminApiService) ListDeployableInstances

ListDeployableInstances

  • 指定项目和游戏版本,获取可以部署的实例
  • @param varForms model.ConsoleAdminListDeployableInstancesForms

func (*ConsoleAdminApiService) ListGameDeployDetailsOfProject added in v1.0.20230718

ListGameDeployDetailsOfProject

  • 获取项目下游戏部署版本信息
  • @param varForms model.ConsoleAdminListGameDeployDetailsOfProjectForms

func (*ConsoleAdminApiService) ListGameVersions

ListGameVersions

  • 分页获取游戏版本列表
  • @param varForms model.ConsoleAdminListGameVersionsForms

func (*ConsoleAdminApiService) ListGames

ListGames

  • 分页获取游戏列表
  • @param varForms model.ConsoleAdminListGamesForms

func (*ConsoleAdminApiService) ListInstancesOfProject added in v1.0.20230602

ListInstancesOfProject

  • 分页获取项目中的实例
  • @param varForms model.ConsoleAdminListInstancesOfProjectForms

func (*ConsoleAdminApiService) ListProjects

ListProjects

  • 分页获取项目列表
  • @param varForms model.ConsoleAdminListProjectsForms

func (*ConsoleAdminApiService) ListVersionDeployInstances added in v1.0.20230718

ListVersionDeployInstances

  • 获取项目下游戏版本的部署实例信息
  • @param varForms model.ConsoleAdminListVersionDeployInstancesForms

func (*ConsoleAdminApiService) RemoveGameFromProject

RemoveGameFromProject

  • 将游戏移出项目
  • @param varForms model.ConsoleAdminRemoveGameFromProjectForms

func (*ConsoleAdminApiService) SubmitDeployment

SubmitDeployment

  • 提交游戏版本的部署请求
  • @param varForms model.ConsoleAdminSubmitDeploymentForms

func (*ConsoleAdminApiService) UploadGameVersionByDownload

UploadGameVersionByDownload

  • 一键上传:文件上传接口,用远程下载的方式生成新版本
  • @param varForms model.ConsoleAdminUploadGameVersionByDownloadForms

type DispatchApiService

type DispatchApiService service

func (*DispatchApiService) BatchStopGame

BatchStopGame

  • 游戏下全量踢下线,异步接口
  • @param varForms model.BatchStopGameForms

func (*DispatchApiService) CancelGameHang

CancelGameHang

  • 取消游戏挂机
  • @param varForms model.CancelGameHangForms

func (*DispatchApiService) GameNotify added in v1.0.20230718

GameNotify

  • 游戏通知
  • @param varForms model.GameNotifyForms

func (*DispatchApiService) GetGameConcurrency

GetGameConcurrency

  • 调用GetGameConcurrency获取游戏当前并发数
  • @param varForms model.GetGameConcurrencyForms

func (*DispatchApiService) GetStock

GetStock

  • 调用GetStock获取游戏当前库存
  • @param varForms model.GetStockForms

func (*DispatchApiService) GetStopGameToken

GetStopGameToken

  • 全量踢下线获取token
  • @param varForms model.GetStopGameTokenForms

func (*DispatchApiService) ListGameServerIp

ListGameServerIp

  • 获取自己租户下的游戏服务器ip列表
  • @param varForms model.ListGameServerIpForms

func (*DispatchApiService) QueryGameHang

QueryGameHang

  • 查询游戏挂机状态
  • @param varForms model.QueryGameHangForms

func (*DispatchApiService) QuerySessionStatus

QuerySessionStatus

  • 查询会话当前状态
  • @param varForms model.QuerySessionStatusForms

func (*DispatchApiService) SetGameAlive

SetGameAlive

  • 设置游戏可运行时长
  • @param varForms model.SetGameAliveForms

func (*DispatchApiService) SetGameHang

SetGameHang

  • 设置游戏挂机
  • @param varForms model.SetGameHangForms

func (*DispatchApiService) StopGame

StopGame

  • 服务端发起,停止某个用户的某个游戏的某个会话
  • @param varForms model.StopGameForms

func (*DispatchApiService) StopPreopenContainer added in v1.0.20230718

StopPreopenContainer

  • 停止预开容器
  • @param varForms model.StopPreopenContainerForms

func (*DispatchApiService) TryToGetSlot

TryToGetSlot

  • 为用户调度分配游戏容器,容器一旦分配成功会被锁住,一段时间内不再分配给其他用户,过期释放。
  • @param varForms model.TryToGetSlotForms

type GenericError

type GenericError struct {
	// contains filtered or unexported fields
}

GenericError Provides access to the body, error and model on returned errors.

func (GenericError) Body

func (e GenericError) Body() []byte

Body returns the raw bytes of the response

func (GenericError) Error

func (e GenericError) Error() string

Error returns non-empty string if there was an error.

func (GenericError) Model

func (e GenericError) Model() interface{}

Model returns the unpacked model of the error

type InteractiveApiService

type InteractiveApiService service

func (*InteractiveApiService) GetParty

GetParty

  • 获取派对
  • @param varForms model.InteractiveGetPartyForms

func (*InteractiveApiService) GetPartyStatus

GetPartyStatus

  • 查询派对游戏状态
  • @param varForms model.InteractiveGetPartyStatusForms

func (*InteractiveApiService) JoinParty

JoinParty

  • 加入分配席位
  • @param varForms model.InteractiveJoinPartyForms

func (*InteractiveApiService) KickOutUser

KickOutUser

  • 踢出派对
  • @param varForms model.InteractiveKickOutUserForms

func (*InteractiveApiService) ModifySeats

ModifySeats

  • 修改席位
  • @param varForms model.InteractiveModifySeatsForms

func (*InteractiveApiService) ShutDownParty

ShutDownParty

  • 关闭派对
  • @param varForms model.InteractiveShutDownPartyForms

type LiveApiService

type LiveApiService service

func (*LiveApiService) QueryStatus

QueryStatus

  • 查询推流状态
  • @param varForms model.LiveQueryStatusForms

func (*LiveApiService) StartGameLive

StartGameLive

  • 开始直播推流
  • @param varForms model.LiveStartGameLiveForms

func (*LiveApiService) StopGameLive

StopGameLive

  • 结束直播推流
  • @param varForms model.LiveStopGameLiveForms

type MultiplayApiService

type MultiplayApiService service

func (*MultiplayApiService) Close

Close

  • 关闭联机
  • @param varForms model.MultiplayCloseForms

func (*MultiplayApiService) Init

Init

  • 初始化联机
  • @param varForms model.MultiplayInitForms

func (*MultiplayApiService) Join

Join

  • 加入联机
  • @param varForms model.MultiplayJoinForms

func (*MultiplayApiService) Leave

Leave

  • 离开联机
  • @param varForms model.MultiplayLeaveForms

func (*MultiplayApiService) Modify

Modify

  • 修改联机
  • @param varForms model.MultiplayModifyForms

func (*MultiplayApiService) Query

Query

  • 离开联机
  • @param varForms model.MultiplayQueryForms

type TokenApiService

type TokenApiService service

func (*TokenApiService) GetPair added in v1.0.20230602

GetPair

  • 获取临时安全令牌(二元组)

func (*TokenApiService) GetTriple

GetTriple

  • 获取临时安全令牌

type UsercontrollerApiService

type UsercontrollerApiService service

func (*UsercontrollerApiService) DeleteGameArchive

DeleteGameArchive

  • 根据存档id删除存档纪录
  • @param varForms model.UsercontrollerDeleteGameArchiveForms

func (*UsercontrollerApiService) GetGameTrialSurplusDuration

GetGameTrialSurplusDuration

  • 查询剩余试玩游戏时长
  • @param varForms model.UsercontrollerGetGameTrialSurplusDurationForms

func (*UsercontrollerApiService) GetUserGameArchive added in v1.0.20230809

GetUserGameArchive

  • 查询用户正常状态的最新存档纪录,按照存档时间倒序
  • @param varForms model.UsercontrollerGetUserGameArchiveForms

func (*UsercontrollerApiService) ListLatestGameArchive

ListLatestGameArchive

  • 查询用户正常状态的最新存档纪录,按照存档时间倒序
  • @param varForms model.UsercontrollerListLatestGameArchiveForms

func (*UsercontrollerApiService) RestoreGameArchive

RestoreGameArchive

  • 将指定的存档ID恢复为最新存档
  • @param varForms model.UsercontrollerRestoreGameArchiveForms

func (*UsercontrollerApiService) UpdateGameArchiveTagStatus

UpdateGameArchiveTagStatus

  • 更新存档打标状态
  • @param varForms model.UsercontrollerUpdateGameArchiveTagStatusForms

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL