{"modulePath":"github.com/bergwolf/gophercloud","version":"v1.0.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package extensions\n\nPackage extensions provides information and interaction with the different extensions available for an OpenStack service.\n\nThe purpose of OpenStack API extensions is to:\n\n  - Introduce new features in the API without requiring a version change.\n  - Introduce vendor-specific niche functionality.\n  - Act as a proving ground for experimental functionalities that might be included in a future version of the API.\n\nExtensions usually have tags that prevent conflicts with other extensions that define attributes or resources with the same names, and with core resources and attributes. Because an extension might not be supported by all plug-ins, its availability varies with deployments and the specific plug-in.\n\n## Functions\n\n```go\nfunc ExtensionURL(c *gophercloud.ServiceClient, name string) string\n```\nExtensionURL generates the URL for an extension resource by name.\n\n```go\nfunc List(c *gophercloud.ServiceClient) pagination.Pager\n```\nList returns a Pager which allows you to iterate over the full collection of extensions. It does not accept query parameters.\n\n```go\nfunc ListExtensionURL(c *gophercloud.ServiceClient) string\n```\nListExtensionURL generates the URL for the extensions resource collection.\n\n## Types\n\n```go\ntype Extension struct {\n\tUpdated     string        `json:\"updated\" mapstructure:\"updated\"`\n\tName        string        `json:\"name\" mapstructure:\"name\"`\n\tLinks       []interface{} `json:\"links\" mapstructure:\"links\"`\n\tNamespace   string        `json:\"namespace\" mapstructure:\"namespace\"`\n\tAlias       string        `json:\"alias\" mapstructure:\"alias\"`\n\tDescription string        `json:\"description\" mapstructure:\"description\"`\n}\n```\nExtension is a struct that represents an OpenStack extension.\n\n```go\nfunc ExtractExtensions(page pagination.Page) ([]Extension, error)\n```\nExtractExtensions accepts a Page struct, specifically an ExtensionPage struct, and extracts the elements into a slice of Extension structs. In other words, a generic collection is mapped into a relevant slice.\n\n```go\ntype ExtensionPage struct {\n\tpagination.SinglePageBase\n}\n```\nExtensionPage is the page returned by a pager when traversing over a collection of extensions.\n\n```go\nfunc (r ExtensionPage) IsEmpty() (bool, error)\n```\nIsEmpty checks whether an ExtensionPage struct is empty.\n\n```go\ntype GetResult struct {\n\tgophercloud.Result\n}\n```\nGetResult temporarily stores the result of a Get call. Use its Extract() method to interpret it as an Extension.\n\n```go\nfunc Get(c *gophercloud.ServiceClient, alias string) GetResult\n```\nGet retrieves information for a specific extension using its alias.\n\n```go\nfunc (r GetResult) Extract() (*Extension, error)\n```\nExtract interprets a GetResult as an Extension.\n\n","path":"github.com/bergwolf/gophercloud/openstack/common/extensions","name":"extensions","synopsis":"Package extensions provides information and interaction with the different extensions available for an OpenStack service.","isRedistributable":true}
