blob: 4384d47a94ecf6753c5c3aae062362ab1a9f16ec [file] [log] [blame]
package imagedata
import (
"fmt"
"io"
"gerrit.mcp.mirantis.net/debian/gophercloud.git"
)
// UploadResult is the result of an upload image operation
type UploadResult struct {
gophercloud.ErrResult
}
// DownloadResult is the result of a download image operation
type DownloadResult struct {
gophercloud.Result
}
// Extract builds images model from io.Reader
func (r DownloadResult) Extract() (io.Reader, error) {
if r, ok := r.Body.(io.Reader); ok {
return r, nil
}
return nil, fmt.Errorf("Expected io.Reader but got: %T(%#v)", r.Body, r.Body)
}