zones

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOpts

type CreateOpts struct {
	Zone          string `json:"zone" required:"true"`
	SOAPrimaryDNS string `json:"soa_primary_dns,omitempty"`
	SOAAdminEmail string `json:"soa_admin_email,omitempty"`
	SOARefresh    int    `json:"soa_refresh,omitempty"`
	SOARetry      int    `json:"soa_retry,omitempty"`
	SOAExpire     int    `json:"soa_expire,omitempty"`
	SOATTL        int    `json:"soa_ttl,omitempty"`
}

CreateOpts specifies the attributes used to create a zone.

func (CreateOpts) Map

func (opts CreateOpts) Map() (map[string]interface{}, error)

Map formats a CreateOpts structure into a request body.

type CreateOptsBuilder

type CreateOptsBuilder interface {
	Map() (map[string]interface{}, error)
}

type CreateResult

type CreateResult struct {
	// contains filtered or unexported fields
}

zoneCreateResult is the result of a zoneCreate request. Call its Extract method to interpret the result as a zone.

func Create

func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)

Create implements a zone create request.

func (CreateResult) Extract

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

Extract interprets a zoneGetResult, zoneCreateResult or zoneUpdateResult as a zone. An error is returned if the original call or the extraction failed.

type DeleteResult

type DeleteResult struct {
	gophercloud.ErrResult
}

zoneDeleteResult is the result of a zoneDelete request. Call its ExtractErr method to determine if the request succeeded or failed.

func Delete

func Delete(client *gophercloud.ServiceClient, id string) (r DeleteResult)

Delete implements a zone delete request.

type GetResult

type GetResult struct {
	// contains filtered or unexported fields
}

GetResult is the result of a Get request. Call its Extract method to interpret the result as a Zone.

func Get

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

Get returns information about a zone, given its ID.

func (GetResult) Extract

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

Extract interprets a zoneGetResult, zoneCreateResult or zoneUpdateResult as a zone. An error is returned if the original call or the extraction failed.

type ListOpts

type ListOpts struct {
	// Integer value for the limit of values to return.
	Limit int `q:"limit"`

	// UUID of the zone at which you want to set a marker.
	Marker string `q:"marker"`

	ID            string `q:"uuid"`
	Zone          string `q:"zone"`
	SOAPrimaryDNS string `q:"soa_primary_dns"`
	SOAAdminEmail string `q:"soa_admin_email"`
	SOASerial     int    `q:"soa_serial"`
	SOARefresh    int    `q:"soa_refresh"`
	SOARetry      int    `q:"soa_retry"`
	SOAExpire     int    `q:"soa_expire"`
	SOATTL        int    `q:"soa_ttl"`
	Status        string `q:"status"`
}

ListOpts allows the filtering and sorting of paginated 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) ToListQuery

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

ToListQuery formats a listOpts structure into a query string.

type ListOptsBuilder

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

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

type ListResult

type ListResult struct {
	gophercloud.Result
}

ListResult is the result of a List request. Call its Extract method to interpret the result as a slice of Zones.

func List

func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) (r ListResult)

List implements a zone list request.

func (ListResult) Extract

func (r ListResult) Extract() ([]Zone, error)

Extract extracts a slice of zones from a zoneListResult.

type UpdateOpts

type UpdateOpts struct {
	SOAPrimaryDNS string `json:"soa_primary_dns,omitempty"`
	SOAAdminEmail string `json:"soa_admin_email,omitempty"`
	SOARefresh    int    `json:"soa_refresh,omitempty"`
	SOARetry      int    `json:"soa_retry,omitempty"`
	SOAExpire     int    `json:"soa_expire,omitempty"`
	SOATTL        int    `json:"soa_ttl,omitempty"`
}

UpdateOpts specifies the attributes to update a zone.

func (UpdateOpts) Map

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

Map formats a zoneUpdateOpts structure into a request body.

type UpdateOptsBuilder

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

type UpdateResult

type UpdateResult struct {
	// contains filtered or unexported fields
}

zoneUpdateResult is the result of a zoneUpdate request. Call its Extract method to interpret the result as a zone.

func Update

func Update(client *gophercloud.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult)

Update implements a zone update request.

func (UpdateResult) Extract

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

Extract interprets a zoneGetResult, zoneCreateResult or zoneUpdateResult as a zone. An error is returned if the original call or the extraction failed.

type Zone

type Zone struct {
	ID         string `json:"uuid"`
	Zone       string `json:"zone"`
	PrimaryDNS string `json:"soa_primary_dns"`
	AdminEmail string `json:"soa_admin_email"`
	Serial     int    `json:"soa_serial"`
	Refresh    int    `json:"soa_refresh"`
	Retry      int    `json:"soa_retry"`
	Expire     int    `json:"soa_expire"`
	TTL        int    `json:"soa_ttl"`
	Status     string `json:"status"`
}

Zone represents a public DNS zone.

Jump to

Keyboard shortcuts

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