Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractBillingsInto ¶
func ExtractBillingsInto(r pagination.Page, v interface{}) error
func List ¶
func List(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
List returns a Pager which allows you to iterate over a collection of billing.
Types ¶
type Billing ¶
type Billing struct { Region string `json:"REGION"` ProjectID string `json:"PROJECT_ID"` ProjectName string `json:"PROJECT_NAME"` ObjectID string `json:"OBJECT_ID"` MetricType string `json:"METRIC_TYPE"` Amount float64 `json:"AMOUNT,string"` Duration float64 `json:"DURATION,string"` PriceLoc float64 `json:"PRICE_LOC,string"` PriceSec float64 `json:"PRICE_SEC,string"` CostObject string `json:"COST_OBJECT"` CostObjectType string `json:"COST_OBJECT_TYPE"` COInherited Bool `json:"CO_INHERITED"` SendCC int `json:"SEND_CC"` }
Billing represents a Billing Billing.
func ExtractBillings ¶
func ExtractBillings(r pagination.Page) ([]Billing, error)
ExtractBillings accepts a Page struct, specifically a BillingPage struct, and extracts the elements into a slice of Billing structs. In other words, a generic collection is mapped into a relevant slice.
type BillingPage ¶
type BillingPage struct {
pagination.SinglePageBase
}
BillingPage is the page returned by a pager when traversing over a collection of billing.
type ListOpts ¶
type ListOpts struct { CostObject string `q:"cost_object"` ProjectID string `q:"project_id"` ExcludeMissingCO bool `q:"exclude_missing_co"` Format string `q:"format"` Language string `q:"language"` Year int `q:"year"` Month int `q:"month"` From time.Time `q:"-"` To time.Time `q:"-"` }
ListOpts is a structure that holds options for listing billings.
func (ListOpts) ToBillingListQuery ¶
ToBillingListQuery 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.