costobjects

package
v0.0.0-...-d74374d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

List returns a Pager which allows you to iterate over a collection of costobjects.

Types

type CostObject

type CostObject struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

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

func (r GetResult) ExtractInto(v interface{}) error

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

func (opts ListOpts) ToCostObjectListQuery() (string, error)

ToCostObjectListQuery formats a ListOpts into a query string.

type ListOptsBuilder

type ListOptsBuilder interface {
	ToCostObjectListQuery() (string, error)
}

ListOptsBuilder allows extensions to add additional parameters to the List request.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL