feat: 完整游戏运维功能
This commit is contained in:
@@ -13,6 +13,20 @@ func ValidateRunControlHello(hello domain.RunControlHello) error {
|
||||
violations = appendRequired(violations, "runEndpointId", hello.RunEndpointID)
|
||||
violations = appendRequired(violations, "displayName", hello.DisplayName)
|
||||
violations = appendRequired(violations, "version", hello.Version)
|
||||
if hello.Architecture != "" {
|
||||
if !validDistributionTargetOS(hello.Platform) {
|
||||
violations = append(violations, "platform is invalid")
|
||||
}
|
||||
if !validDistributionTargetArch(hello.Architecture) {
|
||||
violations = append(violations, "architecture is invalid")
|
||||
}
|
||||
}
|
||||
if (hello.UpdateJobID == "") != (hello.UpdateOutcome == "") {
|
||||
violations = append(violations, "updateJobId and updateOutcome must be provided together")
|
||||
}
|
||||
if hello.UpdateOutcome != "" && hello.UpdateOutcome != "succeeded" && hello.UpdateOutcome != "rolled-back" {
|
||||
violations = append(violations, "updateOutcome is invalid")
|
||||
}
|
||||
violations = appendRequired(violations, "capabilityReport.fingerprint", hello.CapabilityReport.Fingerprint)
|
||||
if hello.ServerInstanceID != "" || hello.PluginID != "" || hello.ComponentKind != "" || hello.ComponentKey != "" || hello.KeyGeneration != 0 {
|
||||
violations = appendRequired(violations, "serverInstanceId", hello.ServerInstanceID)
|
||||
|
||||
Reference in New Issue
Block a user