Brad Ison | 366a7a0 | 2016-03-27 17:06:21 -0400 | [diff] [blame^] | 1 | package webhooks |
| 2 | |
| 3 | import ( |
| 4 | "github.com/rackspace/gophercloud" |
| 5 | "github.com/rackspace/gophercloud/pagination" |
| 6 | ) |
| 7 | |
| 8 | // List returns all webhooks for a scaling policy. |
| 9 | func List(client *gophercloud.ServiceClient, groupID, policyID string) pagination.Pager { |
| 10 | url := listURL(client, groupID, policyID) |
| 11 | |
| 12 | createPageFn := func(r pagination.PageResult) pagination.Page { |
| 13 | return WebhookPage{pagination.SinglePageBase(r)} |
| 14 | } |
| 15 | |
| 16 | return pagination.NewPager(client, url, createPageFn) |
| 17 | } |