domains

package
v0.0.0-...-33ee089 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package domains provides interaction with Limes at the domain hierarchical level.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Update

func Update(c *gophercloud.ServiceClient, domainID string, opts UpdateOptsBuilder) error

Update modifies the attributes of a domain.

Types

type CommonResult

type CommonResult struct {
	gophercloud.Result
}

CommonResult is the result of a Get/List operation. Call its appropriate Extract method to interpret it as a Domain or a slice of Domains.

func Get

func Get(c *gophercloud.ServiceClient, domainID string, opts GetOptsBuilder) (r CommonResult)

Get retrieves details on a single domain, by ID.

func List

List enumerates the domains to which the current token has access.

func (CommonResult) Extract

func (r CommonResult) Extract() (*limes.DomainReport, error)

Extract interprets a CommonResult as a Domain.

func (CommonResult) ExtractDomains

func (r CommonResult) ExtractDomains() ([]limes.DomainReport, error)

ExtractDomains interprets a CommonResult as a slice of Domains.

type GetOpts

type GetOpts struct {
	Cluster  string `h:"X-Limes-Cluster-Id"`
	Area     string `q:"area"`
	Service  string `q:"service"`
	Resource string `q:"resource"`
}

GetOpts contains parameters for filtering a Get request.

func (GetOpts) ToDomainGetParams

func (opts GetOpts) ToDomainGetParams() (map[string]string, string, error)

ToDomainGetParams formats a GetOpts into a map of headers and a query string.

type GetOptsBuilder

type GetOptsBuilder interface {
	ToDomainGetParams() (map[string]string, string, error)
}

GetOptsBuilder allows extensions to add additional parameters to the Get request.

type ListOpts

type ListOpts struct {
	Cluster  string `h:"X-Limes-Cluster-Id"`
	Area     string `q:"area"`
	Service  string `q:"service"`
	Resource string `q:"resource"`
}

ListOpts contains parameters for filtering a List request.

func (ListOpts) ToDomainListParams

func (opts ListOpts) ToDomainListParams() (map[string]string, string, error)

ToDomainListParams formats a ListOpts into a map of headers and a query string.

type ListOptsBuilder

type ListOptsBuilder interface {
	ToDomainListParams() (map[string]string, string, error)
}

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

type UpdateOpts

type UpdateOpts struct {
	Cluster  string             `h:"X-Limes-Cluster-Id"`
	Services limes.QuotaRequest `json:"services"`
}

UpdateOpts contains parameters to update a domain.

func (UpdateOpts) ToDomainUpdateMap

func (opts UpdateOpts) ToDomainUpdateMap() (map[string]string, map[string]interface{}, error)

ToDomainUpdateMap formats a UpdateOpts into a map of headers and a request body.

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToDomainUpdateMap() (map[string]string, map[string]interface{}, error)
}

UpdateOptsBuilder allows extensions to add additional parameters to the Update request.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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