flavors

package
v0.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2021 License: Apache-2.0 Imports: 2 Imported by: 1

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

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.

func (GetResult) Extract

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

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

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.

Directories

Path Synopsis
cdn_flavors_v1
cdn_flavors_v1

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL