added simulate stages. Changed GSN_PREDICTOR_GRIB_TTL to 48h
This commit is contained in:
parent
c4f355a32e
commit
fe207f3fab
21 changed files with 978 additions and 137 deletions
|
|
@ -430,6 +430,54 @@ func (s *PerformPredictionProfile) UnmarshalText(data []byte) error {
|
|||
}
|
||||
}
|
||||
|
||||
type PerformPredictionSimulateStagesItem string
|
||||
|
||||
const (
|
||||
PerformPredictionSimulateStagesItemAscent PerformPredictionSimulateStagesItem = "ascent"
|
||||
PerformPredictionSimulateStagesItemDescent PerformPredictionSimulateStagesItem = "descent"
|
||||
PerformPredictionSimulateStagesItemFloat PerformPredictionSimulateStagesItem = "float"
|
||||
)
|
||||
|
||||
// AllValues returns all PerformPredictionSimulateStagesItem values.
|
||||
func (PerformPredictionSimulateStagesItem) AllValues() []PerformPredictionSimulateStagesItem {
|
||||
return []PerformPredictionSimulateStagesItem{
|
||||
PerformPredictionSimulateStagesItemAscent,
|
||||
PerformPredictionSimulateStagesItemDescent,
|
||||
PerformPredictionSimulateStagesItemFloat,
|
||||
}
|
||||
}
|
||||
|
||||
// MarshalText implements encoding.TextMarshaler.
|
||||
func (s PerformPredictionSimulateStagesItem) MarshalText() ([]byte, error) {
|
||||
switch s {
|
||||
case PerformPredictionSimulateStagesItemAscent:
|
||||
return []byte(s), nil
|
||||
case PerformPredictionSimulateStagesItemDescent:
|
||||
return []byte(s), nil
|
||||
case PerformPredictionSimulateStagesItemFloat:
|
||||
return []byte(s), nil
|
||||
default:
|
||||
return nil, errors.Errorf("invalid value: %q", s)
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalText implements encoding.TextUnmarshaler.
|
||||
func (s *PerformPredictionSimulateStagesItem) UnmarshalText(data []byte) error {
|
||||
switch PerformPredictionSimulateStagesItem(data) {
|
||||
case PerformPredictionSimulateStagesItemAscent:
|
||||
*s = PerformPredictionSimulateStagesItemAscent
|
||||
return nil
|
||||
case PerformPredictionSimulateStagesItemDescent:
|
||||
*s = PerformPredictionSimulateStagesItemDescent
|
||||
return nil
|
||||
case PerformPredictionSimulateStagesItemFloat:
|
||||
*s = PerformPredictionSimulateStagesItemFloat
|
||||
return nil
|
||||
default:
|
||||
return errors.Errorf("invalid value: %q", data)
|
||||
}
|
||||
}
|
||||
|
||||
// Ref: #/components/schemas/PredictionResult
|
||||
type PredictionResult struct {
|
||||
Metadata PredictionResultMetadata `json:"metadata"`
|
||||
|
|
@ -511,6 +559,7 @@ type PredictionResultPredictionItemStage string
|
|||
const (
|
||||
PredictionResultPredictionItemStageAscent PredictionResultPredictionItemStage = "ascent"
|
||||
PredictionResultPredictionItemStageDescent PredictionResultPredictionItemStage = "descent"
|
||||
PredictionResultPredictionItemStageFloat PredictionResultPredictionItemStage = "float"
|
||||
)
|
||||
|
||||
// AllValues returns all PredictionResultPredictionItemStage values.
|
||||
|
|
@ -518,6 +567,7 @@ func (PredictionResultPredictionItemStage) AllValues() []PredictionResultPredict
|
|||
return []PredictionResultPredictionItemStage{
|
||||
PredictionResultPredictionItemStageAscent,
|
||||
PredictionResultPredictionItemStageDescent,
|
||||
PredictionResultPredictionItemStageFloat,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -528,6 +578,8 @@ func (s PredictionResultPredictionItemStage) MarshalText() ([]byte, error) {
|
|||
return []byte(s), nil
|
||||
case PredictionResultPredictionItemStageDescent:
|
||||
return []byte(s), nil
|
||||
case PredictionResultPredictionItemStageFloat:
|
||||
return []byte(s), nil
|
||||
default:
|
||||
return nil, errors.Errorf("invalid value: %q", s)
|
||||
}
|
||||
|
|
@ -542,6 +594,9 @@ func (s *PredictionResultPredictionItemStage) UnmarshalText(data []byte) error {
|
|||
case PredictionResultPredictionItemStageDescent:
|
||||
*s = PredictionResultPredictionItemStageDescent
|
||||
return nil
|
||||
case PredictionResultPredictionItemStageFloat:
|
||||
*s = PredictionResultPredictionItemStageFloat
|
||||
return nil
|
||||
default:
|
||||
return errors.Errorf("invalid value: %q", data)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue