Complete platform management workflows
This commit is contained in:
@@ -14,6 +14,16 @@ func ValidateRunControlHello(hello domain.RunControlHello) error {
|
||||
violations = appendRequired(violations, "displayName", hello.DisplayName)
|
||||
violations = appendRequired(violations, "version", hello.Version)
|
||||
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)
|
||||
violations = appendRequired(violations, "pluginId", hello.PluginID)
|
||||
if hello.ComponentKind != domain.DistributionComponentRun && hello.ComponentKind != domain.DistributionComponentClientManager {
|
||||
violations = append(violations, "componentKind is invalid")
|
||||
}
|
||||
if hello.KeyGeneration <= 0 {
|
||||
violations = append(violations, "keyGeneration must be positive")
|
||||
}
|
||||
}
|
||||
if !validRunControlStatus(hello.Status) {
|
||||
violations = append(violations, "status is invalid")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user