Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminUser ¶
type AdminUser struct {
Nickname string `json:"nickname"`
Account string `json:"account"`
Password string `json:"password"`
Roles []string `json:"roles"`
Avatar string `json:"avatar"`
}
用户信息
type Command ¶
type Command struct {
Command string `json:"command"`
// 1:插件运行命令 2:服务端运行命令 3:插件、服务端都运行
Type int64 `json:"type"`
}
运行命令
type ConfParam ¶
type ConfParam struct {
ConfVal string `json:"config_val"`
DefaultConfVal string `json:"-"`
Name string `json:"config_key"`
Level int64 `json:"level"`
Description string `json:"description"`
IsAlterable bool `json:"is_alterable"`
}
配置信息
type MonitorMessage ¶
type MonitorMessage struct {
// id若为0,则为全局资源监控
Id string `json:"id"`
// cpu使用百分比
CpuUsedPercent float64 `json:"cpu_used_percent"`
// 内存使用百分比
MemoryUsedPercent float32 `json:"memory_used_percent"`
// 物理内存使用百分比
VirtualMemoryUsedPercent float64 `json:"virtual_memory_used_percent"`
// 内存使用量
MemoryUsed uint64 `json:"memory_used"`
// 虚拟内存使用量
VirtualMemoryUsed uint64 `json:"virtual_memory_used"`
}
type OperatePlugin ¶
type OperatePlugin struct {
ServerId string `json:"server_id"`
PluginId []string `json:"plugin_id"`
// 操作类型:1. 启动 2. 停止
OperateType int `json:"operate_type"`
}
操作插件
type OperateServer ¶
type OperateServer struct {
ServerId []string `json:"id"`
// 操作类型:1. 启动 2. 停止 3.重启
OperateType int `json:"operate_type"`
}
操作服务器
type PluginCommand ¶
插件命令行解析对象
type PluginInfo ¶
type PluginInfo struct {
Name string `json:"name"`
Id string `json:"id"`
IsBan bool `json:"is_ban"`
CommandName string `json:"command_name"`
Description string `json:"description"`
HelpDescription string `json:"help_description"`
}
插件信息
type ReciveMessage ¶
type ReciveMessage struct {
Player string `json:"player"`
Time string `json:"time"` // 时间字符串 H:i:s
Speak string `json:"speak"` // 玩家发言
OriginData string `json:"origin_data"` // 服务端原始输出
ServerId string `json:"server_id"` // 服务端id
Hour int `json:"hour"` // 时间:小时
Minute int `json:"minute"` // 时间:分钟
Second int `json:"second"` // 时间:秒
Content string `json:"content"` // 事件内容
Source int `json:"source"` // 命令台为1,服务端输出为2
LoggingLevel string `json:"LoggingLevel"` // 日志等级
IsPlayer bool `json:"IsPlayer"` // 是否有玩家
IsUser bool `json:"isUser"` // 是否有玩家,或者为命令行输入
Command string `json:"command"` // 命令
Params []string `json:"params"` // 命令参数
Event int `json:"event"` // 事件类型
}
服务器接收消息
type ServerConf ¶
type ServerConf struct {
// EntryId
// 实例唯一id
EntryId string `json:"id"`
// Name
// 服务器名称
Name string `json:"name"`
// CmdStr
// 执行的完整命令
// 下标为0: 命令名称
// 大于0为命令参数
CmdStr []string `json:"cmd_str"`
// Port
// 启动服务器端口
Port int64 `json:"port"`
// RunPath
// 运行所在工作区间
RunPath string `json:"run_rath"`
// IsMirror
// 是否是镜像服务器
IsMirror bool `json:"is_mirror"`
// IsStartMonitor
// 是否启动资源监听器
IsStartMonitor bool `json:"is_start_monitor"`
// Memory
// 使用内存大小,单位M
Memory int64 `json:"memory"`
// Version
// 服务端版本
Version string `json:"version"`
// GameType
// 服务器模式
GameType string `json:"game_type"`
// State
// 启动状态:0.未启动 1.启动 -1.正在启动 -2.正在关闭
State int64 `json:"state"`
// 本机的ip
Ips []string `json:"ips"`
// 服务端类型: 原版,水龙头等,默认为原版
Side string `json:"side"`
// 备注
Comment string `json:"comment"`
}
服务器配置
type ServerDetail ¶
type ServerDetail struct {
ServInfo *ServerConf `json:"server_info"`
PlgnInfo []*PluginInfo `json:"plugin_info"`
}
服务器详情
type ServerRunState ¶
type ServerRunState struct {
// State
// 启动状态:0.未启动 1.启动 -1.正在启动 -2.正在关闭
State int `json:"state"`
}
服务端运行状态
type SingleCommand ¶
type SingleCommand struct {
Command string `json:"command"`
ServerId string `json:"id"`
// 1:插件运行命令 2:服务端运行命令 3:插件、服务端都运行
Type int64 `json:"type"`
}
运行一条命令
Click to show internal directories.
Click to hide internal directories.