blob: 0b7108501563745f1dcd19cf9d88b541c11d9dbb [file] [log] [blame]
Ash Wilson61dcb022014-10-03 08:15:47 -04001package extensions
2
3import (
Ash Wilson61dcb022014-10-03 08:15:47 -04004 "github.com/rackspace/gophercloud"
5 "github.com/rackspace/gophercloud/pagination"
6)
7
8// Get retrieves information for a specific extension using its alias.
9func Get(c *gophercloud.ServiceClient, alias string) GetResult {
10 var res GetResult
Jamie Hannaford562a7d52015-03-24 16:20:16 +010011 _, res.Err = c.Get(ExtensionURL(c, alias), &res.Body, nil)
Ash Wilson61dcb022014-10-03 08:15:47 -040012 return res
13}
14
Ash Wilson8e1fc8d2014-10-03 08:35:33 -040015// List returns a Pager which allows you to iterate over the full collection of extensions.
16// It does not accept query parameters.
Ash Wilson61dcb022014-10-03 08:15:47 -040017func List(c *gophercloud.ServiceClient) pagination.Pager {
Ash Wilsonb8b16f82014-10-20 10:19:49 -040018 return pagination.NewPager(c, ListExtensionURL(c), func(r pagination.PageResult) pagination.Page {
Ash Wilson61dcb022014-10-03 08:15:47 -040019 return ExtensionPage{pagination.SinglePageBase(r)}
20 })
21}