gophercloud: github.com/rackspace/gophercloud/openstack/cdn/v1/flavors Index | Files

package flavors

import "github.com/rackspace/gophercloud/openstack/cdn/v1/flavors"

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

Package Files

doc.go requests.go results.go urls.go

func ExtractFlavors Uses

func ExtractFlavors(page pagination.Page) ([]Flavor, error)

ExtractFlavors extracts and returns Flavors. It is used while iterating over a flavors.List call.

func List Uses

func List(c *gophercloud.ServiceClient) pagination.Pager

List returns a single page of CDN flavors.

type Flavor Uses

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 `mapstructure:"id"`
    // Specifies the list of providers mapped to this flavor.
    Providers []Provider `mapstructure:"providers"`
    // Specifies the self-navigating JSON document paths.
    Links []gophercloud.Link `mapstructure:"links"`
}

Flavor represents a mapping configuration to a CDN provider.

type FlavorPage Uses

type FlavorPage struct {
    pagination.SinglePageBase
}

FlavorPage is the page returned by a pager when traversing over a collection of CDN flavors.

func (FlavorPage) IsEmpty Uses

func (r FlavorPage) IsEmpty() (bool, error)

IsEmpty returns true if a FlavorPage contains no Flavors.

type GetResult Uses

type GetResult struct {
    gophercloud.Result
}

GetResult represents the result of a get operation.

func Get Uses

func Get(c *gophercloud.ServiceClient, id string) GetResult

Get retrieves a specific flavor based on its unique ID.

func (GetResult) Extract Uses

func (r GetResult) Extract() (*Flavor, error)

Extract is a function that extracts a flavor from a GetResult.

type Provider Uses

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 `mapstructure:"provider"`
    // Specifies a list with an href where rel is provider_url.
    Links []gophercloud.Link `mapstructure:"links"`
}

Provider represents a provider for a particular flavor.

Package flavors imports 3 packages (graph) and is imported by 1 packages. Updated 2016-07-18. Refresh now. Tools for package owners.