@@ -499,27 +499,27 @@ type TTL struct {
499
499
//
500
500
// Task REST resource.
501
501
type Task struct {
502
- Resource
502
+ Resource `yaml:",inline"`
503
503
Name string `json:"name"`
504
- Locator string `json:"locator,omitempty"`
505
- Priority int `json:"priority,omitempty"`
506
- Variant string `json:"variant,omitempty"`
507
- Policy string `json:"policy,omitempty"`
508
- TTL * TTL `json:"ttl,omitempty"`
509
- Addon string `json:"addon,omitempty" binding:"required"`
504
+ Locator string `json:"locator,omitempty" yaml:",omitempty" `
505
+ Priority int `json:"priority,omitempty" yaml:",omitempty" `
506
+ Variant string `json:"variant,omitempty" yaml:",omitempty" `
507
+ Policy string `json:"policy,omitempty" yaml:",omitempty" `
508
+ TTL * TTL `json:"ttl,omitempty" yaml:",omitempty" `
509
+ Addon string `json:"addon,omitempty" binding:"required" yaml:",omitempty" `
510
510
Data interface {} `json:"data" swaggertype:"object" binding:"required"`
511
- Application * Ref `json:"application,omitempty"`
511
+ Application * Ref `json:"application,omitempty" yaml:",omitempty" `
512
512
State string `json:"state"`
513
- Image string `json:"image,omitempty"`
514
- Bucket * Ref `json:"bucket,omitempty"`
515
- Purged bool `json:"purged,omitempty"`
516
- Started * time.Time `json:"started,omitempty"`
517
- Terminated * time.Time `json:"terminated,omitempty"`
518
- Error string `json:"error,omitempty"`
519
- Pod string `json:"pod,omitempty"`
520
- Retries int `json:"retries,omitempty"`
521
- Canceled bool `json:"canceled,omitempty"`
522
- Report * TaskReport `json:"report,omitempty"`
513
+ Image string `json:"image,omitempty" yaml:",omitempty" `
514
+ Bucket * Ref `json:"bucket,omitempty" yaml:",omitempty" `
515
+ Purged bool `json:"purged,omitempty" yaml:",omitempty" `
516
+ Started * time.Time `json:"started,omitempty" yaml:",omitempty" `
517
+ Terminated * time.Time `json:"terminated,omitempty" yaml:",omitempty" `
518
+ Error string `json:"error,omitempty" yaml:",omitempty" `
519
+ Pod string `json:"pod,omitempty" yaml:",omitempty" `
520
+ Retries int `json:"retries,omitempty" yaml:",omitempty" `
521
+ Canceled bool `json:"canceled,omitempty" yaml:",omitempty" `
522
+ Report * TaskReport `json:"report,omitempty" yaml:",omitempty" `
523
523
}
524
524
525
525
//
@@ -577,13 +577,13 @@ func (r *Task) Model() (m *model.Task) {
577
577
//
578
578
// TaskReport REST resource.
579
579
type TaskReport struct {
580
- Resource
580
+ Resource `yaml:",inline"`
581
581
Status string `json:"status"`
582
- Error string `json:"error"`
583
- Total int `json:"total"`
584
- Completed int `json:"completed"`
585
- Activity []string `json:"activity"`
586
- Result interface {} `json:"result,omitempty" swaggertype:"object"`
582
+ Error string `json:"error,omitempty" yaml:",omitempty "`
583
+ Total int `json:"total,omitempty" yaml:",omitempty "`
584
+ Completed int `json:"completed,omitempty" yaml:",omitempty "`
585
+ Activity []string `json:"activity,omitempty" yaml:",omitempty "`
586
+ Result interface {} `json:"result,omitempty" yaml:",omitempty" swaggertype:"object"`
587
587
TaskID uint `json:"task"`
588
588
}
589
589
0 commit comments