Jon Perritt | efe6d1f | 2015-02-09 12:04:06 -0700 | [diff] [blame] | 1 | package buildinfo |
| 2 | |
| 3 | import ( |
Jon Perritt | 27249f4 | 2016-02-18 10:35:59 -0600 | [diff] [blame] | 4 | "github.com/gophercloud/gophercloud" |
Jon Perritt | efe6d1f | 2015-02-09 12:04:06 -0700 | [diff] [blame] | 5 | ) |
| 6 | |
Jon Perritt | 99f6312 | 2015-02-11 12:39:55 -0700 | [diff] [blame] | 7 | // Revision represents the API/Engine revision of a Heat deployment. |
Jon Perritt | efe6d1f | 2015-02-09 12:04:06 -0700 | [diff] [blame] | 8 | type Revision struct { |
Jon Perritt | 3c16647 | 2016-02-25 03:07:41 -0600 | [diff] [blame] | 9 | Revision string `json:"revision"` |
Jon Perritt | efe6d1f | 2015-02-09 12:04:06 -0700 | [diff] [blame] | 10 | } |
| 11 | |
| 12 | // BuildInfo represents the build information for a Heat deployment. |
| 13 | type BuildInfo struct { |
Jon Perritt | 3c16647 | 2016-02-25 03:07:41 -0600 | [diff] [blame] | 14 | API Revision `json:"api"` |
| 15 | Engine Revision `json:"engine"` |
Jon Perritt | efe6d1f | 2015-02-09 12:04:06 -0700 | [diff] [blame] | 16 | } |
| 17 | |
| 18 | // GetResult represents the result of a Get operation. |
| 19 | type GetResult struct { |
| 20 | gophercloud.Result |
| 21 | } |
| 22 | |
| 23 | // Extract returns a pointer to a BuildInfo object and is called after a |
| 24 | // Get operation. |
| 25 | func (r GetResult) Extract() (*BuildInfo, error) { |
Jon Perritt | 3c16647 | 2016-02-25 03:07:41 -0600 | [diff] [blame] | 26 | var s *BuildInfo |
| 27 | err := r.ExtractInto(&s) |
| 28 | return s, err |
Jon Perritt | efe6d1f | 2015-02-09 12:04:06 -0700 | [diff] [blame] | 29 | } |