added simulate stages. Changed GSN_PREDICTOR_GRIB_TTL to 48h

This commit is contained in:
afanasyev.aa 2025-12-09 18:25:16 +09:00
parent c4f355a32e
commit fe207f3fab
21 changed files with 978 additions and 137 deletions

View file

@ -6,7 +6,6 @@ import (
"fmt"
"github.com/go-faster/errors"
"github.com/ogen-go/ogen/validate"
)
@ -34,6 +33,19 @@ func (s PerformPredictionProfile) Validate() error {
}
}
func (s PerformPredictionSimulateStagesItem) Validate() error {
switch s {
case "ascent":
return nil
case "descent":
return nil
case "float":
return nil
default:
return errors.Errorf("invalid value: %v", s)
}
}
func (s *PredictionResult) Validate() error {
if s == nil {
return validate.ErrNilPointer
@ -131,6 +143,8 @@ func (s PredictionResultPredictionItemStage) Validate() error {
return nil
case "descent":
return nil
case "float":
return nil
default:
return errors.Errorf("invalid value: %v", s)
}