Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractPricesInto ¶
func ExtractPricesInto(r pagination.Page, v interface{}) error
func List ¶
func List(c *gophercloud.ServiceClient, opts ListOpts) pagination.Pager
List returns a Pager which allows you to iterate over a collection of price.
Types ¶
type ListOpts ¶
type ListOpts struct { OnlyActive bool `q:"onlyActive"` MetricType string `q:"METRIC_TYPE"` Region string `q:"-"` From time.Time `q:"-"` To time.Time `q:"-"` }
ListOpts is a structure that holds options for listing prices.
func (ListOpts) ToPriceListQuery ¶
ToPriceListQuery formats a ListOpts into a query string.
type Price ¶
type Price struct { SendCC int `json:"SEND_CC"` CostElement int `json:"COST_ELEMENT"` PriceLoc float64 `json:"PRICE_LOC,string"` PriceSec float64 `json:"PRICE_SEC,string"` ValidForProjectType string `json:"VALID_FOR_PROJECT_TYPE"` ObjectType string `json:"OBJECT_TYPE"` MetricType string `json:"METRIC_TYPE"` Region string `json:"REGION"` ValidFrom time.Time `json:"-"` ValidTo time.Time `json:"-"` }
Price represents a Billing Price.
func ExtractPrices ¶
func ExtractPrices(r pagination.Page) ([]Price, error)
ExtractPrices accepts a Page struct, specifically a PricePage struct, and extracts the elements into a slice of Price structs. In other words, a generic collection is mapped into a relevant slice.
func (*Price) MarshalJSON ¶
func (*Price) UnmarshalJSON ¶
type PricePage ¶
type PricePage struct {
pagination.SinglePageBase
}
PricePage is the page returned by a pager when traversing over a collection of price.
Click to show internal directories.
Click to hide internal directories.