Samuel A. Falvo II | 17ae565 | 2014-02-12 20:47:43 -0800 | [diff] [blame] | 1 | package images |
| 2 | |
| 3 | import ( |
| 4 | "fmt" |
| 5 | "github.com/racker/perigee" |
| 6 | ) |
| 7 | |
Samuel A. Falvo II | 17ae565 | 2014-02-12 20:47:43 -0800 | [diff] [blame] | 8 | var ErrNotImplemented = fmt.Errorf("Images functionality not implemented.") |
| 9 | |
| 10 | type ListResults map[string]interface{} |
Samuel A. Falvo II | 808bb63 | 2014-03-12 00:07:50 -0700 | [diff] [blame] | 11 | type ImageResults map[string]interface{} |
Samuel A. Falvo II | 17ae565 | 2014-02-12 20:47:43 -0800 | [diff] [blame] | 12 | |
| 13 | func List(c *Client) (ListResults, error) { |
| 14 | var lr ListResults |
| 15 | |
| 16 | h, err := c.getListHeaders() |
| 17 | if err != nil { |
| 18 | return nil, err |
| 19 | } |
| 20 | |
| 21 | err = perigee.Get(c.getListUrl(), perigee.Options{ |
Samuel A. Falvo II | e246ac0 | 2014-02-13 23:20:09 -0800 | [diff] [blame] | 22 | Results: &lr, |
Samuel A. Falvo II | 17ae565 | 2014-02-12 20:47:43 -0800 | [diff] [blame] | 23 | MoreHeaders: h, |
| 24 | }) |
| 25 | return lr, err |
| 26 | } |