blob: 79783c41ca03febd4131447c9372a9dd22fbbc6a [file] [log] [blame]
Samuel A. Falvo II17ae5652014-02-12 20:47:43 -08001package images
2
3import (
4 "fmt"
5 "github.com/racker/perigee"
6)
7
Samuel A. Falvo II17ae5652014-02-12 20:47:43 -08008var ErrNotImplemented = fmt.Errorf("Images functionality not implemented.")
9
10type ListResults map[string]interface{}
Samuel A. Falvo II808bb632014-03-12 00:07:50 -070011type ImageResults map[string]interface{}
Samuel A. Falvo II17ae5652014-02-12 20:47:43 -080012
13func 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 IIe246ac02014-02-13 23:20:09 -080022 Results: &lr,
Samuel A. Falvo II17ae5652014-02-12 20:47:43 -080023 MoreHeaders: h,
24 })
25 return lr, err
26}