ptrs

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2020 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetURL

func GetURL(c *gophercloud.ServiceClient, region string, floatingipId string) string

func List

Query PTR records of EIPs.

func ListURL

func ListURL(c *gophercloud.ServiceClient) string

func RestoreURL

func RestoreURL(c *gophercloud.ServiceClient, region string, floatingipId string) string

func SetupURL

func SetupURL(c *gophercloud.ServiceClient, region string, floatingipId string) string

func UpdateURL

func UpdateURL(c *gophercloud.ServiceClient, region string, floatingipId string) string

Types

type DeletePtrResponse

type DeletePtrResponse struct {
	Ptrdname string `json:"ptrdname"`
}

type FloatingIp

type FloatingIp struct {
	// PTR record ID, which is in {region}:{floatingip_id} format
	ID string `json:"id"`

	// Domain name of the PTR record
	Ptrdname string `json:"ptrdname"`

	// PTR record description
	Description string `json:"description"`

	// Caching period of a PTR record (in seconds).The default value
	// is 300s.The value range is 300–2147483647.
	TTL int `json:"ttl"`

	// EIP
	Address string `json:"address"`

	// Resource status.The value can be PENDING_CREATE, ACTIVE,
	// PENDING_DELETE, PENDING_UPDATE, or ERROR.
	Status string `json:"status"`

	// Requested operation on the resource.The value can be CREATE,
	// UPDATE, or DELETE.
	Action string `json:"action"`

	// Link of the current resource or other related resources.When a
	// response is broken into pages, a next link is provided to retrieve all results.
	Links Link `json:"links"`
}

type GetResult

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

func Get

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

func (GetResult) Extract

func (r GetResult) Extract() (*FloatingIp, error)
type Link struct {
	Href string `json:"href"`
	Rel  string `json:"rel"`
	Self string `json:"self"`
	Next string `json:"next"`
}

type ListOpts

type ListOpts struct {
	// Start resource ID of pagination query.If the parameter is left
	// blank, only resources on the first page are queried.
	Marker string `q:"marker"`

	// Number of resources returned on each page.Value range:
	// 0–500.Commonly used values are 10, 20, and 50.
	Limit int `q:"limit"`

	Offset int `q:"offset"`
}

func (ListOpts) ToListQuery

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

type ListOptsBuilder

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

type ListPtrResponse

type ListPtrResponse struct {
	// Link of the current resource or other related resources.When a
	// response is broken into pages, a next link is provided to retrieve all results.
	Links Link `json:"links"`

	// Number of resources that meet the filter condition
	Metadata Metadata `json:"metadata"`

	// PTR record object list
	Floatingips []FloatingIp `json:"floatingips"`
}

func ExtractPtrs

func ExtractPtrs(r pagination.Page) (*ListPtrResponse, error)

type Metadata

type Metadata struct {
	// Total number of resources
	TotalCount int `json:"total_count"`
}

type PtrPage

type PtrPage struct {
	pagination.LinkedPageBase
}

func (PtrPage) IsEmpty

func (r PtrPage) IsEmpty() (bool, error)

type RestoreOpts

type RestoreOpts struct {
}

func (RestoreOpts) ToPtrsRestoreMap

func (opts RestoreOpts) ToPtrsRestoreMap() (map[string]interface{}, error)

type RestoreOptsBuilder

type RestoreOptsBuilder interface {
	ToPtrsRestoreMap() (map[string]interface{}, error)
}

type RestoreResult

type RestoreResult struct {
	gophercloud.ErrResult
}

func Restore

func Restore(client *gophercloud.ServiceClient, region string, floatingIPId string) (r RestoreResult)

type SetupOpts

type SetupOpts struct {
	// Domain name of the PTR record
	Ptrdname string `json:"ptrdname" required:"true"`

	// PTR record description
	Description string `json:"description,omitempty"`

	// Caching period of a PTR record (in seconds).The default value
	// is 300s.The value range is 300–2147483647.
	TTL int `json:"ttl,omitempty"`
}

func (SetupOpts) ToPtrsSetupMap

func (opts SetupOpts) ToPtrsSetupMap() (map[string]interface{}, error)

type SetupOptsBuilder

type SetupOptsBuilder interface {
	ToPtrsSetupMap() (map[string]interface{}, error)
}

type SetupResult

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

func Setup

func Setup(client *gophercloud.ServiceClient, region string, floatingipId string, opts SetupOptsBuilder) (r SetupResult)

func Update

func Update(client *gophercloud.ServiceClient, region string, floatingipId string, opts SetupOptsBuilder) (r SetupResult)

func (SetupResult) Extract

func (r SetupResult) Extract() (*FloatingIp, error)

type UpdateOpts

type UpdateOpts struct {
	// Domain name of the PTR record
	Ptrdname string `json:"ptrdname" required:"true"`

	// PTR record description
	Description string `json:"description,omitempty"`

	// Caching period of a PTR record (in seconds).The default value
	// is 300s.The value range is 300–2147483647.
	TTL int `json:"ttl,omitempty"`
}

func (UpdateOpts) ToPtrsSetupMap

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

Jump to

Keyboard shortcuts

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