Jon Perritt | 85ed523 | 2015-01-16 09:14:51 -0700 | [diff] [blame] | 1 | package base |
| 2 | |
Jon Perritt | 1239521 | 2016-02-24 10:41:17 -0600 | [diff] [blame^] | 3 | import "github.com/gophercloud/gophercloud" |
Jon Perritt | 85ed523 | 2015-01-16 09:14:51 -0700 | [diff] [blame] | 4 | |
| 5 | // HomeDocument is a resource that contains all the resources for the CDN API. |
| 6 | type HomeDocument map[string]interface{} |
| 7 | |
| 8 | // GetResult represents the result of a Get operation. |
| 9 | type GetResult struct { |
| 10 | gophercloud.Result |
| 11 | } |
| 12 | |
| 13 | // Extract is a function that accepts a result and extracts a home document resource. |
| 14 | func (r GetResult) Extract() (*HomeDocument, error) { |
Jon Perritt | 1239521 | 2016-02-24 10:41:17 -0600 | [diff] [blame^] | 15 | var s HomeDocument |
| 16 | err := r.ExtractInto(&s) |
| 17 | return &s, err |
Jon Perritt | 85ed523 | 2015-01-16 09:14:51 -0700 | [diff] [blame] | 18 | } |
| 19 | |
| 20 | // PingResult represents the result of a Ping operation. |
| 21 | type PingResult struct { |
| 22 | gophercloud.ErrResult |
| 23 | } |