Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchivePolicy ¶
type ArchivePolicy struct { Definition []Granularity `json:"definition"` BackWindow int `json:"back_window"` Name string `json:"name"` AggregationMethods []string `json:"aggregation_methods"` }
type CreateMetric ¶
type CreateMetric struct { ArchivePolicyName string `mapstructure:"archive_policy_name"` CreatedByProjectID string `mapstructure:"created_by_project_id"` CreatedByUserID string `mapstructure:"created_by_user_id"` Creator string `json:"creator"` ID string `json:"id"` Name string `json:"name"` ResourceID string `mapstructure:"resource_id"` Unit string `json:"unit"` }
type CreateOpts ¶
type CreateOpts struct {
ArchivePolicyName string `json:"archive_policy_name" required:"true"`
}
func (CreateOpts) ToMetricCreateMap ¶
func (opts CreateOpts) ToMetricCreateMap() (map[string]interface{}, error)
type CreateOptsBuilder ¶
type CreateResult ¶
type CreateResult struct {
gophercloud.Result
}
func Create ¶
func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*CreateResult, error)
Extract interprets any CreateResult as an array of CreateMetric
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
func Delete ¶
func Delete(client *gophercloud.ServiceClient, metricID string) (r DeleteResult)
Metrics can be deleted through a request
type Granularity ¶
type ListOpts ¶
type ListOpts struct { // ID of the last-seen item from the previous response Sort string `q:"sort"` // Optional, maximum number of results to return Limit int `q:"limit"` }
ListOpts allows the filtering and sorting of collections through the API. Filtering is achieved by passing in struct field values that map to the server attributes you want to see returned.
func (ListOpts) ToMetricListQuery ¶
ToMetricListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.
type ListResult ¶
type ListResult struct {
gophercloud.Result
}
func List ¶
func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) ListResult
List makes a request against the API to list metrics accessible to you.
func (ListResult) Extract ¶
func (r ListResult) Extract() ([]Metric, error)
Extract interprets any ListResult as an array of Metrics
type Metric ¶
type Metric struct { CreatedByUserID string `mapstructure:"created_by_user_id"` Name string `json:"name"` Creator string `json:"creator"` ResourceID string `mapstructure:"resource_id"` CreatedByProjectID string `mapstructure:"created_by_project_id"` ArchivePolicy ArchivePolicy `mapstructure:"archive_policy"` ID string `json:"id"` Unit string `json:"unit"` }
type ReadResult ¶
type ReadResult struct {
gophercloud.Result
}
func Read ¶
func Read(client *gophercloud.ServiceClient, metricID string) ReadResult
Read makes request against the API to Read metric
func (ReadResult) Extract ¶
func (r ReadResult) Extract() (Metric, error)
Extract interprets any ReadResult as an array of Metric