v16.1.0
This commit is contained in:
dayterr
2026-08-28 16:47:26 +03:00
parent 3c5157281e
commit fe3c7bf63a
142 changed files with 3160 additions and 479 deletions

View File

@@ -492,5 +492,11 @@ func sepDescriptionValidator(fe validator.FieldLevel) bool {
func watchdogActionValidator(fe validator.FieldLevel) bool {
fieldValue := fe.Field().String()
return IsInSlice(fieldValue, watchdogActionVaues)
return IsInSlice(fieldValue, watchdogActionValues)
}
func memoryBalloonModeValidator(fe validator.FieldLevel) bool {
fieldValue := fe.Field().String()
return IsInSlice(fieldValue, memoryBalloonModeValues)
}

View File

@@ -2,7 +2,6 @@ package validators
import (
"errors"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/multierror"
"github.com/go-playground/validator/v10"

View File

@@ -331,5 +331,10 @@ func registerAllValidators(validate *validator.Validate) error {
return err
}
err = validate.RegisterValidation("memoryBalloonMode", memoryBalloonModeValidator)
if err != nil {
return err
}
return nil
}

View File

@@ -81,7 +81,9 @@ var (
sepTechStatusValues = []string{"ENABLED", "DISABLED"}
watchdogActionVaues = []string{"reset", "shutdown", "poweroff", "pause", "none"}
watchdogActionValues = []string{"reset", "shutdown", "poweroff", "pause", "none"}
memoryBalloonModeValues = []string{"auto", "legacy", "none"}
)
const (