domains

package
v0.0.0-...-01d47d0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 3 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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