feat: support custom server deployment drafts

This commit is contained in:
npc0-hue
2026-07-24 16:56:28 +08:00
parent 292b380f3c
commit 220ef91a8e
36 changed files with 1520 additions and 85 deletions
+6 -2
View File
@@ -13,10 +13,14 @@ func ValidateServerLifecycleCreate(create domain.ServerLifecycleCreate) error {
var violations []string
violations = appendRequired(violations, "id", create.ID)
violations = appendRequired(violations, "pluginId", create.PluginID)
violations = appendRequired(violations, "runEndpointId", create.RunEndpointID)
violations = appendRequired(violations, "name", create.Name)
violations = appendRequired(violations, "profileKey", create.ProfileKey)
if create.RunEndpointID != "" {
violations = appendRequired(violations, "profileKey", create.ProfileKey)
}
violations = appendLifecycleIdempotencyViolations(violations, create.IdempotencyKey)
if err := ValidateServerDeploymentDefinition(create.Deployment); err != nil {
violations = append(violations, err.Error())
}
return finish(violations)
}