Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) pagination.Pager
List returns a Pager which allows you to iterate over a collection of flavors.
Types ¶
type Flavor ¶
type Flavor struct { // Specifies the ID of the flavor. ID string `json:"id"` // Specifies the info of the flavor. Info FlavorInfo `json:"info"` // Specifies the name of the flavor. Name string `json:"name"` Shared bool `json:"shared"` // Specifies the type of the flavor. Type string `json:"type"` // Specifies whether sold out. SoldOut bool `json:"flavor_sold_out"` }
func ExtractFlavors ¶
func ExtractFlavors(r pagination.Page) ([]Flavor, error)
ExtractFlavors accepts a Page struct, specifically a FlavorsPage struct, and extracts the elements into a slice of flavor structs. In other words, a generic collection is mapped into a relevant slice.
type FlavorInfo ¶
type FlavorInfo struct { // Specifies the connection Connection int `json:"connection"` // Specifies the cps. Cps int `json:"cps"` // Specifies the qps Qps int `json:"qps"` // Specifies the https_cps HttpsCps int `json:"https_cps"` // Specifies the lcu Lcu int `json:"lcu"` // Specifies the bandwidth Bandwidth int `json:"bandwidth"` }
type FlavorPage ¶
type FlavorPage struct {
pagination.PageWithInfo
}
FlavorPage is the page returned by a pager when traversing over a collection of flavor.
func (FlavorPage) IsEmpty ¶
func (r FlavorPage) IsEmpty() (bool, error)
IsEmpty checks whether a FlavorsPage struct is empty.
type GetResult ¶
type ListOpts ¶
type ListOpts struct { // Specifies the id. ID []string `q:"id"` // Specifies the name. Name []string `q:"name"` Shared *bool `q:"shared"` // Specifies the type. Type []string `q:"type"` }
ListOpts allows the filtering and sorting of paginated collections through the API.
func (ListOpts) ToFlavorListMap ¶
ToFlavorListMap formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.
Click to show internal directories.
Click to hide internal directories.