(name string, condition func(*StepInput) bool, ifTrue, ifFalse Step)
| 284 | } |
| 285 | |
| 286 | func NewConditionStep(name string, condition func(*StepInput) bool, ifTrue, ifFalse Step) *ConditionStep { |
| 287 | return &ConditionStep{ |
| 288 | id: uuid.New().String(), |
| 289 | name: name, |
| 290 | condition: condition, |
| 291 | ifTrue: ifTrue, |
| 292 | ifFalse: ifFalse, |
| 293 | config: &StepConfig{ |
| 294 | Name: name, |
| 295 | Type: StepTypeCondition, |
| 296 | MaxRetries: 1, |
| 297 | Timeout: 5 * time.Minute, |
| 298 | SkipOnError: false, |
| 299 | }, |
| 300 | } |
| 301 | } |
| 302 | |
| 303 | func (s *ConditionStep) ID() string { return s.id } |
| 304 | func (s *ConditionStep) Name() string { return s.name } |
no test coverage detected