dns

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 zones.

Types

type GetResult

type GetResult struct {
	gophercloud.Result
}

GetResult represents the result of a get operation. Call its Extract method to interpret it as a Zone.

func Get

func Get(c *gophercloud.ServiceClient, id string) (r GetResult)

Get retrieves a specific zone based on its unique ID.

func (GetResult) Extract

func (r GetResult) Extract() (*Zone, error)

Extract is a function that accepts a result and extracts a Zone resource.

func (GetResult) ExtractInto

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

type ListOpts

type ListOpts struct {
	// Name is the DNS Zone name and may include *-wildcards.
	Name string `q:"name"`
	// UUIDs will only return DNS Zones with the specified UUIDs.
	UUIDs []string `q:"uuids"`
	// DomainID will only return DNS Zones with the specified DomainID.
	DomainID string `q:"domain"`
	// ProjectID will only return DNS Zones with the specified ProjectID.
	ProjectID string `q:"project"`
	// Limit will limit the number of results returned per page.
	Limit int `q:"limit"`
}

ListOpts is a structure that holds options for listing DNS zones.

func (ListOpts) ToZoneListQuery

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

ToZoneListQuery formats a ListOpts into a query string.

type ListOptsBuilder

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

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

type Zone

type Zone struct {
	UUID               string            `json:"uuid,omitempty"`
	Name               string            `json:"name,omitempty"`
	Description        string            `json:"description,omitempty"`
	Email              string            `json:"email,omitempty"`
	Serial             int               `json:"serial,omitempty"`
	ParentZoneID       string            `json:"parentZoneId,omitempty"`
	ParentZoneName     string            `json:"parentZoneName,omitempty"`
	Pool               string            `json:"pool,omitempty"`
	PoolDescription    string            `json:"poolDescription,omitempty"`
	TTL                int               `json:"ttl,omitempty"`
	Status             string            `json:"status,omitempty"`
	Action             string            `json:"action,omitempty"`
	Type               string            `json:"type,omitempty"`
	Attributes         map[string]string `json:"attributes,omitempty"`
	SharedWithProjects []string          `json:"sharedWithProjects,omitempty"`
	ProjectID          string            `json:"projectId,omitempty"`
	ProjectName        string            `json:"projectName,omitempty"`
	DomainID           string            `json:"domainId,omitempty"`
	DomainName         string            `json:"domainName,omitempty"`
	CreatedAt          string            `json:"createdAt,omitempty"`
	UpdatedAt          string            `json:"updatedAt,omitempty"`
}

func Extract

func Extract(r pagination.Page) ([]Zone, error)

Extract accepts a Page struct, specifically an v1.CommonPage struct, and extracts the elements into a slice of Zone structs.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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