Deployment is created using Deployments of child Entities
()
| 32 | |
| 33 | // Deployment is created using Deployments of child Entities |
| 34 | func (c *App) Deployment() (*deploy.Deployment, error) { |
| 35 | d := new(deploy.Deployment) |
| 36 | err := d.AddDeployment(c.objects) |
| 37 | if err != nil { |
| 38 | return nil, err |
| 39 | } |
| 40 | for _, entity := range c.children() { |
| 41 | deploy, err := entity.Deployment() |
| 42 | if err != nil { |
| 43 | return nil, err |
| 44 | } |
| 45 | |
| 46 | err = d.AddDeployment(*deploy) |
| 47 | if err != nil { |
| 48 | return nil, err |
| 49 | } |
| 50 | } |
| 51 | return d, nil |
| 52 | } |
| 53 | |
| 54 | // Images returns images of child entities |
| 55 | func (c *App) Images() (images []*image.Image) { |