github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/taurusdb/v3/configurations/results.go (about)

     1  package configurations
     2  
     3  import "github.com/huaweicloud/golangsdk"
     4  
     5  type Configuration struct {
     6  	ID            string `json:"id"`
     7  	Name          string `json:"name"`
     8  	Description   string `json:"description"`
     9  	DataStoreVer  string `json:"datastore_version_name"`
    10  	DataStoreName string `json:"datastore_name"`
    11  }
    12  
    13  type ListResult struct {
    14  	golangsdk.Result
    15  }
    16  
    17  func (lr ListResult) Extract() ([]Configuration, error) {
    18  	var a struct {
    19  		Configurations []Configuration `json:"configurations"`
    20  	}
    21  	err := lr.Result.ExtractInto(&a)
    22  	return a.Configurations, err
    23  }