Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
List returns a Pager which allows you to iterate over a collection of costobjects.
Types ¶
type CostObject ¶
func Extract ¶
func Extract(r pagination.Page) ([]CostObject, error)
Extract accepts a Page struct, specifically an v1.CommonPage struct, and extracts the elements into a slice of CostObjects structs.
type GetResult ¶
type GetResult struct {
gophercloud.Result
}
GetResult represents the result of a get operation. Call its Extract method to interpret it as a CostObject.
func Get ¶
func Get(c *gophercloud.ServiceClient, id string) (r GetResult)
Get retrieves a specific costobject based on its unique ID.
func (GetResult) Extract ¶
func (r GetResult) Extract() (*CostObject, error)
Extract is a function that accepts a result and extracts a CostObject resource.
func (GetResult) ExtractInto ¶
type ListOpts ¶
type ListOpts struct { // Project will only return costobjects for the specified project uuid. Project string `q:"project"` // Domain will only return costobjects for the specified domain uuid. Domain string `q:"domain"` // Limit will limit the number of results returned per page. Limit int `q:"limit"` // UUIDs will only return costobjects with the specified UUIDs. UUIDs []string `q:"uuids"` }
ListOpts is a structure that holds options for listing costobjects.
func (ListOpts) ToCostObjectListQuery ¶
ToCostObjectListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.