Documentation ¶
Overview ¶
Package apiversions provides information and interaction with the different API versions for the OpenStack Load Balancer service. This functionality is not restricted to this particular version.
Example to List API Versions
allPages, err := apiversions.List(loadbalancerClient).AllPages() if err != nil { panic(err) } allVersions, err := apiversions.ExtractAPIVersions(allPages) if err != nil { panic(err) } for _, version := range allVersions { fmt.Printf("%+v\n", version) }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(c *gophercloud.ServiceClient) pagination.Pager
List lists all the load balancer API versions available to end-users.
Types ¶
type APIVersion ¶
APIVersion represents an API version for load balancer. It contains the status of the API, and its unique ID.
func ExtractAPIVersions ¶
func ExtractAPIVersions(r 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.