Documentation
¶
Overview ¶
Package commands 提供客户端命令实现
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivateRequest ¶
type ActivateRequest struct {
Code string `json:"code"` // 邀请码
Username string `json:"username"` // 用户名
PublicKey string `json:"public_key"` // Base64 编码的公钥
}
ActivateRequest 激活请求
type ActivateResponse ¶
type ActivateResponse struct {
Code int `json:"code"` // 响应码
Message string `json:"message"` // 响应消息
Data struct {
Token string `json:"token"` // JWT token
Version int `json:"version"` // 凭证版本
} `json:"data"`
}
ActivateResponse 激活响应
type ChallengeResponse ¶
type ChallengeResponse struct {
Code int `json:"code"` // 响应码
Message string `json:"message"` // 响应消息
Data struct {
Nonce string `json:"nonce"` // 随机挑战值
ExpiresIn int `json:"expires_in"` // 过期时间(秒)
} `json:"data"`
}
ChallengeResponse Challenge 响应
type ConnectConfig ¶
type ConnectConfig struct {
ServerURL string // WebSocket 服务器 URL (ws://host:port/ws)
}
ConnectConfig Connect 命令配置
type JoinConfig ¶
JoinConfig Join 命令配置
type JoinResult ¶
JoinResult Join 结果
type LoginRequest ¶
type LoginRequest struct {
Nonce string `json:"nonce"` // 挑战值
Signature string `json:"signature"` // 签名
}
LoginRequest 登录请求
type LoginResponse ¶
type LoginResponse struct {
Code int `json:"code"` // 响应码
Message string `json:"message"` // 响应消息
Data struct {
Token string `json:"token"` // 新的 JWT token
Version int `json:"version"` // 新的凭证版本
} `json:"data"`
}
LoginResponse 登录响应
type LoginResult ¶
LoginResult Login 结果
Click to show internal directories.
Click to hide internal directories.