blob: c5f18975285d7d427275f126f845b2675f5bb798 [file] [log] [blame]
package images
import (
"github.com/rackspace/gophercloud/openstack/identity"
)
type Client struct {
endpoint string
authority identity.AuthResults
options identity.AuthOptions
}
func NewClient(e string, a identity.AuthResults, ao identity.AuthOptions) *Client {
return &Client{
endpoint: e,
authority: a,
options: ao,
}
}
func (c *Client) getListUrl() string {
return c.endpoint + "/images/detail"
}
func (c *Client) getListHeaders() (map[string]string, error) {
t, err := identity.GetToken(c.authority)
if err != nil {
return map[string]string{}, err
}
return map[string]string{
"X-Auth-Token": t.Id,
}, nil
}