gophercloud: github.com/rackspace/gophercloud/openstack/networking/v2/apiversions Index | Files

package apiversions

import "github.com/rackspace/gophercloud/openstack/networking/v2/apiversions"

Package apiversions provides information and interaction with the different API versions for the OpenStack Neutron service. This functionality is not restricted to this particular version.

Index

Package Files

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

func ExtractAPIVersions Uses

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.

func ExtractVersionResources Uses

func ExtractVersionResources(page pagination.Page) ([]APIVersionResource, error)

ExtractVersionResources accepts a Page struct, specifically a APIVersionResourcePage struct, and extracts the elements into a slice of APIVersionResource structs. In other words, the collection is mapped into a relevant slice.

func ListVersionResources Uses

func ListVersionResources(c *gophercloud.ServiceClient, v string) pagination.Pager

ListVersionResources lists all of the different API resources for a particular API versions. Typical resources for Neutron might be: networks, subnets, etc.

func ListVersions Uses

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

ListVersions lists all the Neutron API versions available to end-users

type APIVersion Uses

type APIVersion struct {
    Status string `mapstructure:"status" json:"status"`
    ID     string `mapstructure:"id" json:"id"`
}

APIVersion represents an API version for Neutron. It contains the status of the API, and its unique ID.

type APIVersionPage Uses

type APIVersionPage struct {
    pagination.SinglePageBase
}

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

func (APIVersionPage) IsEmpty Uses

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

IsEmpty checks whether an APIVersionPage struct is empty.

type APIVersionResource Uses

type APIVersionResource struct {
    Name       string `mapstructure:"name" json:"name"`
    Collection string `mapstructure:"collection" json:"collection"`
}

APIVersionResource represents a generic API resource. It contains the name of the resource and its plural collection name.

type APIVersionResourcePage Uses

type APIVersionResourcePage struct {
    pagination.SinglePageBase
}

APIVersionResourcePage is a concrete type which embeds the common SinglePageBase struct, and is used when traversing API versions collections.

func (APIVersionResourcePage) IsEmpty Uses

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

IsEmpty is a concrete function which indicates whether an APIVersionResourcePage is empty or not.

Package apiversions imports 4 packages (graph). Updated 2016-07-19. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).