func (r commonResult) Extract() (*Volume, error) {
	if r.Err != nil {
		return nil, r.Err
	}
	var res struct {
		Volume *Volume `json:"volume"`
	}
	err := mapstructure.Decode(r.Body, &res)
	return res.Volume, err
}
Extract will get the Volume object out of the commonResult object.
package volumes
import (
	"github.com/rackspace/gophercloud"
	"github.com/rackspace/gophercloud/pagination"
	"github.com/mitchellh/mapstructure"
)
type Volume struct {
	Status string `mapstructure:"status"`
	Name string `mapstructure:"display_name"`
	Attachments []map[string]interface{} `mapstructure:"attachments"`
	AvailabilityZone string `mapstructure:"availability_zone"`
	Bootable string `mapstructure:"bootable"`
	CreatedAt string `mapstructure:"created_at"`
	Description string `mapstructure:"display_description"`
	VolumeType string `mapstructure:"volume_type"`
	SnapshotID string `mapstructure:"snapshot_id"`
	SourceVolID string `mapstructure:"source_volid"`
	Metadata map[string]string `mapstructure:"metadata"`
	ID string `mapstructure:"id"`
	Size int `mapstructure:"size"`
}
type CreateResult struct {
	commonResult
}
type GetResult struct {
	commonResult
}
type DeleteResult struct {
	gophercloud.ErrResult
}
type ListResult struct {
	pagination.SinglePageBase
}
func (r ListResult) IsEmpty() (bool, error) {
	volumes, err := ExtractVolumes(r)
	if err != nil {
		return true, err
	}
	return len(volumes) == 0, nil
}
func ExtractVolumes(page pagination.Page) ([]Volume, error) {
	var response struct {
		Volumes []Volume `json:"volumes"`
	}
	err := mapstructure.Decode(page.(ListResult).Body, &response)
	return response.Volumes, err
}
type UpdateResult struct {
	commonResult
}
type commonResult struct {
	gophercloud.Result
}