Jon Perritt | 0842ae8 | 2015-01-19 10:46:15 -0700 | [diff] [blame] | 1 | package services |
| 2 | |
| 3 | import ( |
| 4 | "github.com/rackspace/gophercloud" |
| 5 | |
| 6 | os "github.com/rackspace/gophercloud/openstack/cdn/v1/services" |
| 7 | "github.com/rackspace/gophercloud/pagination" |
| 8 | ) |
| 9 | |
| 10 | // List returns a Pager which allows you to iterate over a collection of |
| 11 | // CDN services. It accepts a ListOpts struct, which allows for pagination via |
| 12 | // marker and limit. |
Jon Perritt | 1b6dbd1 | 2015-01-19 11:20:01 -0700 | [diff] [blame^] | 13 | func List(c *gophercloud.ServiceClient, opts os.ListOptsBuilder) pagination.Pager { |
Jon Perritt | 0842ae8 | 2015-01-19 10:46:15 -0700 | [diff] [blame] | 14 | return os.List(c, opts) |
| 15 | } |
| 16 | |
| 17 | // Create accepts a CreateOpts struct and creates a new CDN service using the |
| 18 | // values provided. |
Jon Perritt | 1b6dbd1 | 2015-01-19 11:20:01 -0700 | [diff] [blame^] | 19 | func Create(c *gophercloud.ServiceClient, opts os.CreateOptsBuilder) os.CreateResult { |
Jon Perritt | 0842ae8 | 2015-01-19 10:46:15 -0700 | [diff] [blame] | 20 | return os.Create(c, opts) |
| 21 | } |
| 22 | |
| 23 | // Get retrieves a specific service based on its unique ID. |
| 24 | func Get(c *gophercloud.ServiceClient, id string) os.GetResult { |
| 25 | return os.Get(c, id) |
| 26 | } |
| 27 | |
| 28 | // Update accepts a UpdateOpts struct and updates an existing CDN service using |
| 29 | // the values provided. |
Jon Perritt | 1b6dbd1 | 2015-01-19 11:20:01 -0700 | [diff] [blame^] | 30 | func Update(c *gophercloud.ServiceClient, id string, opts os.UpdateOptsBuilder) os.UpdateResult { |
Jon Perritt | 0842ae8 | 2015-01-19 10:46:15 -0700 | [diff] [blame] | 31 | return os.Update(c, id, opts) |
| 32 | } |
| 33 | |
| 34 | // Delete accepts a unique ID and deletes the CDN service associated with it. |
| 35 | func Delete(c *gophercloud.ServiceClient, id string) os.DeleteResult { |
| 36 | return os.Delete(c, id) |
| 37 | } |