Ash Wilson | 85d8265 | 2014-08-28 13:57:46 -0400 | [diff] [blame^] | 1 | package v3 |
| 2 | |
| 3 | import "github.com/rackspace/gophercloud" |
| 4 | |
| 5 | // Client abstracts the connection information necessary to make API calls to Identity v3 |
| 6 | // resources. |
| 7 | type Client struct { |
| 8 | gophercloud.ServiceClient |
| 9 | |
| 10 | // TokenID is redudant storage for an active token. |
| 11 | // The Identity service occasionally needs to access the assigned token directly, but I don't want to export it from all |
| 12 | // service clients unless we absolutely need to. |
| 13 | TokenID string |
| 14 | } |
| 15 | |
| 16 | var ( |
| 17 | nilClient = Client{} |
| 18 | ) |
| 19 | |
| 20 | // NewClient attempts to authenticate to the v3 identity endpoint. Returns a populated |
| 21 | // IdentityV3Client on success or an error on failure. |
| 22 | func NewClient(authOptions gophercloud.AuthOptions) (*Client, error) { |
| 23 | return &nilClient, nil |
| 24 | } |