results.go 678 B

123456789101112131415161718192021222324252627282930
  1. package buildinfo
  2. import (
  3. "devel.mephi.ru/iacherepanov/openstack-gophercloud"
  4. )
  5. // Revision represents the API/Engine revision of a Heat deployment.
  6. type Revision struct {
  7. Revision string `json:"revision"`
  8. }
  9. // BuildInfo represents the build information for a Heat deployment.
  10. type BuildInfo struct {
  11. API Revision `json:"api"`
  12. Engine Revision `json:"engine"`
  13. }
  14. // GetResult represents the result of a Get operation.
  15. type GetResult struct {
  16. gophercloud.Result
  17. }
  18. // Extract returns a pointer to a BuildInfo object and is called after a
  19. // Get operation.
  20. func (r GetResult) Extract() (*BuildInfo, error) {
  21. var s *BuildInfo
  22. err := r.ExtractInto(&s)
  23. return s, err
  24. }