Documentation
¶
Index ¶
- func ExtractCostingsInto(r pagination.Page, v interface{}) error
- func ListCluster(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- func ListDomains(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- func ListObjects(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- func ListProjects(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- type Costing
- type CostingPage
- type ListOpts
- type ListOptsBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractCostingsInto ¶
func ExtractCostingsInto(r pagination.Page, v interface{}) error
func ListCluster ¶
func ListCluster(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
List returns a Pager which allows you to iterate over a collection of costing clusters.
func ListDomains ¶
func ListDomains(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
List returns a Pager which allows you to iterate over a collection of costing domains.
func ListObjects ¶
func ListObjects(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
List returns a Pager which allows you to iterate over a collection of costing objects.
func ListProjects ¶
func ListProjects(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
List returns a Pager which allows you to iterate over a collection of costing projects.
Types ¶
type Costing ¶
type Costing struct { Year int `json:"year"` Month int `json:"month"` Region string `json:"region"` ProjectID string `json:"project_id"` ObjectID string `json:"object_id"` CostObject string `json:"cost_object"` CostObjectType string `json:"cost_object_type"` COInherited bool `json:"co_inherited"` AllocationType string `json:"allocation_type"` Service string `json:"service"` Measure string `json:"measure"` Amount float64 `json:"amount"` AmountUnit string `json:"amount_unit"` Duration float64 `json:"duration"` DurationUnit string `json:"duration_unit"` PriceLoc float64 `json:"price_loc"` PriceSec float64 `json:"price_sec"` Currency string `json:"currency"` }
Costing represents a Costing Costing.
func ExtractCostings ¶
func ExtractCostings(r pagination.Page) ([]Costing, error)
ExtractCostings accepts a Page struct, specifically a CostingPage struct, and extracts the elements into a slice of Costing structs. In other words, a generic collection is mapped into a relevant slice.
type CostingPage ¶
type CostingPage struct {
pagination.SinglePageBase
}
CostingPage is the page returned by a pager when traversing over a collection of costing.
type ListOpts ¶
type ListOpts struct { CostObject string `q:"cost_object"` ProjectID string `q:"project_id"` DomainID string `q:"domain_id"` Service string `q:"service"` Measure string `q:"measure"` ExcludeInternalCO bool `q:"exclude_internal_co"` Format string `q:"format"` Language string `q:"language"` Last int `q:"last"` Start time.Time `q:"-"` End time.Time `q:"-"` }
ListOpts is a structure that holds options for listing costings.
func (ListOpts) ToCostingListQuery ¶
ToCostingListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.