Documentation ¶
Overview ¶
Package flavors provides information and interaction with the flavors API resource in the OpenStack CDN service. This API resource allows for listing flavors and retrieving a specific flavor.
A flavor is a mapping configuration to a CDN provider.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(c *gophercloud.ServiceClient) pagination.Pager
List returns a single page of CDN flavors.
Types ¶
type Flavor ¶
type Flavor struct { // Specifies the name of the flavor. The name must not exceed 64 bytes in // length and is limited to unicode, digits, underscores, and hyphens. ID string `json:"id"` // Specifies the list of providers mapped to this flavor. Providers []Provider `json:"providers"` // Specifies the self-navigating JSON document paths. Links []gophercloud.Link `json:"links"` }
Flavor represents a mapping configuration to a CDN provider.
func ExtractFlavors ¶
func ExtractFlavors(r pagination.Page) ([]Flavor, error)
ExtractFlavors extracts and returns Flavors. It is used while iterating over a flavors.List call.
type FlavorPage ¶
type FlavorPage struct {
pagination.SinglePageBase
}
FlavorPage is the page returned by a pager when traversing over a collection of CDN flavors.
func (FlavorPage) IsEmpty ¶
func (r FlavorPage) IsEmpty() (bool, error)
IsEmpty returns true if a FlavorPage contains no Flavors.
type GetResult ¶
type GetResult struct {
gophercloud.Result
}
GetResult represents the result of a get operation.
func Get ¶
func Get(c *gophercloud.ServiceClient, id string) (r GetResult)
Get retrieves a specific flavor based on its unique ID.
type Provider ¶
type Provider struct { // Specifies the name of the provider. The name must not exceed 64 bytes in // length and is limited to unicode, digits, underscores, and hyphens. Provider string `json:"provider"` // Specifies a list with an href where rel is provider_url. Links []gophercloud.Link `json:"links"` }
Provider represents a provider for a particular flavor.