github.com/gophercloud/gophercloud@v1.11.0/openstack/orchestration/v1/buildinfo/results.go (about)

     1  package buildinfo
     2  
     3  import (
     4  	"github.com/gophercloud/gophercloud"
     5  )
     6  
     7  // Revision represents the API/Engine revision of a Heat deployment.
     8  type Revision struct {
     9  	Revision string `json:"revision"`
    10  }
    11  
    12  // BuildInfo represents the build information for a Heat deployment.
    13  type BuildInfo struct {
    14  	API    Revision `json:"api"`
    15  	Engine Revision `json:"engine"`
    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) {
    26  	var s *BuildInfo
    27  	err := r.ExtractInto(&s)
    28  	return s, err
    29  }