Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(c *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 FlavorsPage ¶
type FlavorsPage struct {
pagination.LinkedPageBase
}
FlavorsPage is the page returned by a pager when traversing over a collection of flavor.
func (FlavorsPage) IsEmpty ¶
func (r FlavorsPage) IsEmpty() (bool, error)
IsEmpty checks whether a FlavorsPage struct is empty.
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.