Dan Kirkwood | ceb8409 | 2016-03-01 13:58:34 -0700 | [diff] [blame^] | 1 | package quotas |
| 2 | |
| 3 | import ( |
| 4 | "github.com/rackspace/gophercloud" |
| 5 | "github.com/rackspace/gophercloud/pagination" |
| 6 | ) |
| 7 | |
| 8 | func List(client *gophercloud.ServiceClient) pagination.Pager { |
| 9 | return pagination.NewPager(client, listURL(client), func(r pagination.PageResult) pagination.Page { |
| 10 | return QuotaPage{pagination.SinglePageBase(r)} |
| 11 | }) |
| 12 | } |
| 13 | |
| 14 | // Get returns public data about a previously created Quota. |
| 15 | func Get(client *gophercloud.ServiceClient, name string) GetResult { |
| 16 | var res GetResult |
| 17 | _, res.Err = client.Get(getURL(client, name), &res.Body, nil) |
| 18 | return res |
| 19 | } |