domains

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: 4 Imported by: 1

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

This section is empty.

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

Extract interprets a CommonResult as a Domain.

func (CommonResult) ExtractDomains

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

ExtractDomains interprets a CommonResult as a slice of Domains.

type GetOpts

type GetOpts struct {
	Areas     []string                      `q:"area"`
	Services  []limes.ServiceType           `q:"service"`
	Resources []limesresources.ResourceName `q:"resource"`
}

GetOpts contains parameters for filtering a Get request.

func (GetOpts) ToDomainGetParams

func (opts GetOpts) ToDomainGetParams() (headers map[string]string, quersString string, err 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 {
	Areas     []string                      `q:"area"`
	Services  []limes.ServiceType           `q:"service"`
	Resources []limesresources.ResourceName `q:"resource"`
}

ListOpts contains parameters for filtering a List request.

func (ListOpts) ToDomainListParams

func (opts ListOpts) ToDomainListParams() (headers map[string]string, queryString string, err 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 {
	Services limesresources.QuotaRequest `json:"services"`
}

UpdateOpts contains parameters to update a domain.

func (UpdateOpts) ToDomainUpdateMap

func (opts UpdateOpts) ToDomainUpdateMap() (headers map[string]string, requestBody map[string]interface{}, err 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.

type UpdateResult

type UpdateResult struct {
	gophercloud.ErrResult
}

UpdateResult is the result of an Update operation. Call its appropriate ExtractErr method to extract the error from the result.

func Update

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

Update modifies the attributes of a domain.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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