feat: 完整游戏运维功能
This commit is contained in:
@@ -19,6 +19,9 @@ type RunControlHello struct {
|
||||
Version string
|
||||
Status RunEndpointStatus
|
||||
Platform string
|
||||
Architecture string
|
||||
UpdateJobID string
|
||||
UpdateOutcome string
|
||||
CapabilityReport RunCapabilityReport
|
||||
Capacity RunCapacity
|
||||
}
|
||||
@@ -29,6 +32,7 @@ type RunControlHelloResult struct {
|
||||
SessionToken string
|
||||
ServerTime time.Time
|
||||
HeartbeatIntervalSeconds int
|
||||
SessionExpiresAt time.Time
|
||||
FeatureFlags []string
|
||||
}
|
||||
|
||||
@@ -51,11 +55,29 @@ type RunControlHeartbeatResult struct {
|
||||
|
||||
type RunControlSession struct {
|
||||
RunEndpointID string
|
||||
SessionToken string
|
||||
SessionToken string `json:"-"`
|
||||
SessionTokenHash string
|
||||
Status AuthSessionStatus
|
||||
Generation int
|
||||
CapabilityFingerprint string
|
||||
HeartbeatIntervalSeconds int
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
ExpiresAt time.Time
|
||||
RevokedAt time.Time
|
||||
RequireSignedRequests bool
|
||||
UsedNonces []string
|
||||
}
|
||||
|
||||
type RunRequestSignature struct {
|
||||
RunEndpointID string
|
||||
SessionToken string
|
||||
Method string
|
||||
Path string
|
||||
Timestamp string
|
||||
Nonce string
|
||||
BodyHash string
|
||||
Signature string
|
||||
}
|
||||
|
||||
func CopyRunCapabilityReport(report RunCapabilityReport) RunCapabilityReport {
|
||||
@@ -82,5 +104,6 @@ func CopyRunControlHeartbeatResult(result RunControlHeartbeatResult) RunControlH
|
||||
}
|
||||
|
||||
func CopyRunControlSession(session RunControlSession) RunControlSession {
|
||||
session.UsedNonces = CopyStringSlice(session.UsedNonces)
|
||||
return session
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user