blob: 9c7a9a444b7d390d6b6defe020eb73f63c769dca [file] [log] [blame]
Jon Perritt0ce24ad2014-10-20 21:59:45 -05001package bulk
2
3import (
4 "github.com/rackspace/gophercloud"
5
6 "github.com/mitchellh/mapstructure"
7
8 )
9
10// DeleteResult represents the result of a delete operation.
11type DeleteResult struct {
12 gophercloud.Result
13}
14
15type DeleteBody struct {
16 NumberNotFound int `mapstructure:"Number Not Found"`
17 ResponseStatus string `mapstructure:"Response Status"`
18 Errors []string `mapstructure:"Errors"`
19 NumberDeleted int `mapstructure:"Number Deleted"`
20 ResponseBody string `mapstructure:"Response Body"`
21}
22
23func (dr DeleteResult) ExtractBody() (DeleteBody, error) {
24 var resp DeleteBody
25 err := mapstructure.Decode(dr.Body, &resp)
26 return resp, err
27}
28
29type ExtractResult struct {
30 gophercloud.Result
31}