github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/iec/v1/flavors/results.go (about)

     1  package flavors
     2  
     3  import (
     4  	"github.com/huaweicloud/golangsdk"
     5  	"github.com/huaweicloud/golangsdk/openstack/iec/v1/common"
     6  )
     7  
     8  type commonResult struct {
     9  	golangsdk.Result
    10  }
    11  
    12  type GetResult struct {
    13  	commonResult
    14  }
    15  
    16  type Flavors struct {
    17  	Count   int             `json:"count"`
    18  	Flavors []common.Flavor `json:"flavors"`
    19  }
    20  
    21  func (r GetResult) Extract() (*Flavors, error) {
    22  	var entity Flavors
    23  	err := r.ExtractIntoStructPtr(&entity, "")
    24  	return &entity, err
    25  }