apiversions

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2014 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package apiversions provides information and interaction with the different API versions for the OpenStack Block Storage service, code-named Cinder.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

List lists all the Cinder API versions available to end-users.

Types

type APIVersion

type APIVersion struct {
	ID      string `json:"id" mapstructure:"id"`           // unique identifier
	Status  string `json:"status" mapstructure:"status"`   // current status
	Updated string `json:"updated" mapstructure:"updated"` // date last updated
}

APIVersion represents an API version for Cinder.

func ExtractAPIVersions

func ExtractAPIVersions(page pagination.Page) ([]APIVersion, error)

ExtractAPIVersions takes a collection page, extracts all of the elements, and returns them a slice of APIVersion structs. It is effectively a cast.

type APIVersionPage

type APIVersionPage struct {
	pagination.SinglePageBase
}

APIVersionPage is the page returned by a pager when traversing over a collection of API versions.

func (APIVersionPage) IsEmpty

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

IsEmpty checks whether an APIVersionPage struct is empty.

type GetResult

type GetResult struct {
	gophercloud.Result
}

GetResult represents the result of a get operation.

func Get

func Get(client *gophercloud.ServiceClient, v string) GetResult

Get will retrieve the volume type with the provided ID. To extract the volume type from the result, call the Extract method on the GetResult.

func (GetResult) Extract

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

Extract is a function that accepts a result and extracts an API version resource.

Jump to

Keyboard shortcuts

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