ptrrecords

package
v0.0.0-...-63319d1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MPL-2.0, Apache-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 {
	// Name of the ptr.
	PtrName string `json:"ptrdname" required:"true"`

	// Description of the ptr.
	Description string `json:"description,omitempty"`

	// TTL is the time to live of the ptr.
	TTL int `json:"-"`

	// Tags of the ptr.
	Tags []Tag `json:"tags,omitempty"`

	// Enterprise project id
	EnterpriseProjectID string `json:"enterprise_project_id,omitempty"`
}

CreateOpts specifies the attributes used to create a ptr.

func (CreateOpts) ToPtrCreateMap

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

ToPtrCreateMap formats an CreateOpts structure into a request body.

type CreateOptsBuilder

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

CreateOptsBuilder allows extensions to add additional attributes to the Create request.

type CreateResult

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

CreateResult is the result of a Create request. Call its Extract method to interpret the result as a Ptr.

func Create

func Create(client *golangsdk.ServiceClient, region string, fip_id string, opts CreateOptsBuilder) (r CreateResult)

Create implements a ptr create/update request.

func (CreateResult) Extract

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

Extract interprets a GetResult, CreateResult as a Ptr. An error is returned if the original call or the extraction failed.

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

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

func Delete

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

Delete implements a ptr 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 Ptr.

func Get

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

Get returns information about a ptr, given its ID.

func (GetResult) Extract

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

Extract interprets a GetResult, CreateResult as a Ptr. An error is returned if the original call or the extraction failed.

type Ptr

type Ptr struct {
	// ID uniquely identifies this ptr amongst all other ptr records.
	ID string `json:"id"`

	// Name for this ptr.
	PtrName string `json:"ptrdname"`

	// Description for this ptr.
	Description string `json:"description"`

	// TTL is the Time to Live for the ptr.
	TTL int `json:"ttl"`

	// Address of the floating ip.
	Address string `json:"address"`

	// Status of the PTR.
	Status string `json:"status"`

	// Enterprise project id
	EnterpriseProjectID string `json:"enterprise_project_id"`
}

Ptr represents a ptr record.

type Tag

type Tag struct {
	//tag key
	Key string `json:"key" required:"true"`
	//tag value
	Value string `json:"value" required:"true"`
}

Tag is a structure of key value pair.

Jump to

Keyboard shortcuts

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