blob: 10881eb282b23bc34392e1f00fd3f7dc55a60267 [file] [log] [blame]
Jon Perritt0842ae82015-01-19 10:46:15 -07001package services
2
3import (
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 Perritt1b6dbd12015-01-19 11:20:01 -070013func List(c *gophercloud.ServiceClient, opts os.ListOptsBuilder) pagination.Pager {
Jon Perritt0842ae82015-01-19 10:46:15 -070014 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 Perritt1b6dbd12015-01-19 11:20:01 -070019func Create(c *gophercloud.ServiceClient, opts os.CreateOptsBuilder) os.CreateResult {
Jon Perritt0842ae82015-01-19 10:46:15 -070020 return os.Create(c, opts)
21}
22
23// Get retrieves a specific service based on its unique ID.
24func 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 Perritt1b6dbd12015-01-19 11:20:01 -070030func Update(c *gophercloud.ServiceClient, id string, opts os.UpdateOptsBuilder) os.UpdateResult {
Jon Perritt0842ae82015-01-19 10:46:15 -070031 return os.Update(c, id, opts)
32}
33
34// Delete accepts a unique ID and deletes the CDN service associated with it.
35func Delete(c *gophercloud.ServiceClient, id string) os.DeleteResult {
36 return os.Delete(c, id)
37}