records

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOptsBuilder

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

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

func Create

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

Create implements a record create request.

func (CreateResult) ExtractA

func (r CreateResult) ExtractA() (*RecordA, error)

ExtractA interprets a GetResult, CreateResult or UpdateResult as a RecordA. An error is returned if the original call or the extraction failed.

func (CreateResult) ExtractAAAA

func (r CreateResult) ExtractAAAA() (*RecordAAAA, error)

ExtractAAAA interprets a GetResult, CreateResult or UpdateResult as a RecordAAAA. An error is returned if the original call or the extraction failed.

func (CreateResult) ExtractCNAME

func (r CreateResult) ExtractCNAME() (*RecordCNAME, error)

ExtractA interprets a GetResult, CreateResult or UpdateResult as a RecordA. An error is returned if the original call or the extraction failed.

func (CreateResult) ExtractMX

func (r CreateResult) ExtractMX() (*RecordMX, error)

ExtractMX interprets a GetResult, CreateResult or UpdateResult as a RecordMX. An error is returned if the original call or the extraction failed.

func (CreateResult) ExtractNS

func (r CreateResult) ExtractNS() (*RecordNS, error)

ExtractNS interprets a GetResult, CreateResult or UpdateResult as a RecordNS. An error is returned if the original call or the extraction failed.

func (CreateResult) ExtractSRV

func (r CreateResult) ExtractSRV() (*RecordSRV, error)

ExtractSRV interprets a GetResult, CreateResult or UpdateResult as a RecordSRV. An error is returned if the original call or the extraction failed.

func (CreateResult) ExtractTXT

func (r CreateResult) ExtractTXT() (*RecordTXT, error)

ExtractTXT interprets a GetResult, CreateResult or UpdateResult as a RecordTXT. An error is returned if the original call or the extraction failed.

type DeleteResult

type DeleteResult struct {
	gophercloud.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 *gophercloud.ServiceClient, zoneID string, id string, recordType string) (r DeleteResult)

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

func Get

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

Get returns information about a record, given zone ID, its ID, and recordType.

func (GetResult) ExtractA

func (r GetResult) ExtractA() (*RecordA, error)

ExtractA interprets a GetResult, CreateResult or UpdateResult as a RecordA. An error is returned if the original call or the extraction failed.

func (GetResult) ExtractAAAA

func (r GetResult) ExtractAAAA() (*RecordAAAA, error)

ExtractAAAA interprets a GetResult, CreateResult or UpdateResult as a RecordAAAA. An error is returned if the original call or the extraction failed.

func (GetResult) ExtractCNAME

func (r GetResult) ExtractCNAME() (*RecordCNAME, error)

ExtractA interprets a GetResult, CreateResult or UpdateResult as a RecordA. An error is returned if the original call or the extraction failed.

func (GetResult) ExtractMX

func (r GetResult) ExtractMX() (*RecordMX, error)

ExtractMX interprets a GetResult, CreateResult or UpdateResult as a RecordMX. An error is returned if the original call or the extraction failed.

func (GetResult) ExtractNS

func (r GetResult) ExtractNS() (*RecordNS, error)

ExtractNS interprets a GetResult, CreateResult or UpdateResult as a RecordNS. An error is returned if the original call or the extraction failed.

func (GetResult) ExtractSRV

func (r GetResult) ExtractSRV() (*RecordSRV, error)

ExtractSRV interprets a GetResult, CreateResult or UpdateResult as a RecordSRV. An error is returned if the original call or the extraction failed.

func (GetResult) ExtractTXT

func (r GetResult) ExtractTXT() (*RecordTXT, error)

ExtractTXT interprets a GetResult, CreateResult or UpdateResult as a RecordTXT. An error is returned if the original call or the extraction failed.

type RecordA

type RecordA struct {
	UUID string `json:"uuid"`
	DNS  string `json:"dns"`
	Name string `json:"name"`
	IPv4 string `json:"ipv4"`
	TTL  int    `json:"ttl"`
}

RecordA represents a public DNS zone record A.

type RecordAAAA

type RecordAAAA struct {
	UUID string `json:"uuid"`
	DNS  string `json:"dns"`
	Name string `json:"name"`
	IPv6 string `json:"ipv6"`
	TTL  int    `json:"ttl"`
}

RecordAAAA represents a public DNS zone record AAAA.

type RecordAAAACreateOpts

type RecordAAAACreateOpts struct {
	Name *string `json:"name" required:"true"`
	IPv6 string  `json:"ipv6" required:"true"`
	TTL  int     `json:"ttl,omitempty"`
}

RecordAAAACreateOpts specifies the attributes used to create a record AAAA.

func (RecordAAAACreateOpts) Map

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

Map formats a RecordAAAACreateOpts structure into a request body.

type RecordAAAAUpdateOpts

type RecordAAAAUpdateOpts struct {
	Name string `json:"name" required:"true"`
	IPv6 string `json:"ipv6" required:"true"`
	TTL  int    `json:"ttl,omitempty"`
}

RecordAAAAUpdateOpts specifies the attributes used to update a record AAAA.

func (RecordAAAAUpdateOpts) Map

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

Map formats a RecordAAAAUpdateOpts structure into a request body.

type RecordACreateOpts

type RecordACreateOpts struct {
	Name *string `json:"name" required:"true"`
	IPv4 string  `json:"ipv4" required:"true"`
	TTL  int     `json:"ttl,omitempty"`
}

RecordACreateOpts specifies the attributes used to create a record A.

func (RecordACreateOpts) Map

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

Map formats a RecordACreateOpts structure into a request body.

type RecordAUpdateOpts

type RecordAUpdateOpts struct {
	Name string `json:"name" required:"true"`
	IPv4 string `json:"ipv4" required:"true"`
	TTL  int    `json:"ttl,omitempty"`
}

RecordAUpdateOpts specifies the attributes used to update a record A.

func (RecordAUpdateOpts) Map

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

Map formats a RecordAUpdateOpts structure into a request body.

type RecordCNAME

type RecordCNAME struct {
	UUID    string `json:"uuid"`
	DNS     string `json:"dns"`
	Name    string `json:"name"`
	Content string `json:"content"`
	TTL     int    `json:"ttl"`
}

RecordCNAME represents a public DNS zone record CNAME.

type RecordCNAMECreateOpts

type RecordCNAMECreateOpts struct {
	Name    string `json:"name" required:"true"`
	Content string `json:"content" required:"true"`
	TTL     int    `json:"ttl,omitempty"`
}

RecordCNAMECreateOpts specifies the attributes used to create a record CNAME.

func (RecordCNAMECreateOpts) Map

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

Map formats a RecordCNAMECreateOpts structure into a request body.

type RecordCNAMEUpdateOpts

type RecordCNAMEUpdateOpts struct {
	Name    string `json:"name" required:"true"`
	Content string `json:"content" required:"true"`
	TTL     int    `json:"ttl,omitempty"`
}

RecordCNAMEUpdateOpts specifies the attributes used to update a record CNAME.

func (RecordCNAMEUpdateOpts) Map

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

Map formats a RecordCNAMEUpdateOpts structure into a request body.

type RecordMX

type RecordMX struct {
	UUID     string `json:"uuid"`
	DNS      string `json:"dns"`
	Name     string `json:"name"`
	Priority int    `json:"priority"`
	Content  string `json:"content"`
	TTL      int    `json:"ttl"`
}

RecordMX represents a public DNS zone record MX.

type RecordMXCreateOpts

type RecordMXCreateOpts struct {
	Name     string `json:"name"`
	Priority int    `json:"priority" required:"true"`
	Content  string `json:"content" required:"true"`
	TTL      int    `json:"ttl,omitempty"`
}

RecordMXCreateOpts specifies the attributes used to create a record MX.

func (RecordMXCreateOpts) Map

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

Map formats a RecordMXCreateOpts structure into a request body.

type RecordMXUpdateOpts

type RecordMXUpdateOpts struct {
	Name     string `json:"name" required:"true"`
	Priority int    `json:"priority" required:"true"`
	Content  string `json:"content" required:"true"`
	TTL      int    `json:"ttl,omitempty"`
}

RecordMXUpdateOpts specifies the attributes used to update a record MX.

func (RecordMXUpdateOpts) Map

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

Map formats a RecordMXUpdateOpts structure into a request body.

type RecordNS

type RecordNS struct {
	UUID    string `json:"uuid"`
	DNS     string `json:"dns"`
	Name    string `json:"name"`
	Content string `json:"content"`
	TTL     int    `json:"ttl"`
}

RecordNS represents a public DNS zone record NS.

type RecordNSCreateOpts

type RecordNSCreateOpts struct {
	Name    string `json:"name"`
	Content string `json:"content" required:"true"`
	TTL     int    `json:"ttl,omitempty"`
}

RecordNSCreateOpts specifies the attributes used to create a record NS.

func (RecordNSCreateOpts) Map

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

Map formats a RecordNSCreateOpts structure into a request body.

type RecordNSUpdateOpts

type RecordNSUpdateOpts struct {
	Name    string `json:"name" required:"true"`
	Content string `json:"content" required:"true"`
	TTL     int    `json:"ttl,omitempty"`
}

RecordNSUpdateOpts specifies the attributes used to update a record NS.

func (RecordNSUpdateOpts) Map

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

Map formats a RecordNSUpdateOpts structure into a request body.

type RecordSRV

type RecordSRV struct {
	UUID     string `json:"uuid"`
	DNS      string `json:"dns"`
	Name     string `json:"name"`
	Priority int    `json:"priority"`
	Weight   int    `json:"weight"`
	Host     string `json:"host"`
	Port     int    `json:"port"`
	TTL      int    `json:"ttl"`
}

RecordSRV represents a public DNS zone record SRV.

type RecordSRVCreateOpts

type RecordSRVCreateOpts struct {
	Name     string `json:"name"`
	Priority int    `json:"priority" required:"true"`
	Weight   int    `json:"weight" required:"true"`
	Host     string `json:"host" required:"true"`
	Port     int    `json:"port" required:"true"`
	TTL      int    `json:"ttl,omitempty"`
}

RecordSRVCreateOpts specifies the attributes used to create a record SRV.

func (RecordSRVCreateOpts) Map

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

Map formats a RecordSRVCreateOpts structure into a request body.

type RecordSRVUpdateOpts

type RecordSRVUpdateOpts struct {
	Name     string `json:"name" required:"true"`
	Priority int    `json:"priority" required:"true"`
	Weight   int    `json:"weight" required:"true"`
	Host     string `json:"host" required:"true"`
	Port     int    `json:"port" required:"true"`
	TTL      int    `json:"ttl,omitempty"`
}

RecordSRVUpdateOpts specifies the attributes used to update a record SRV.

func (RecordSRVUpdateOpts) Map

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

Map formats a RecordSRVUpdateOpts structure into a request body.

type RecordTXT

type RecordTXT struct {
	UUID    string `json:"uuid"`
	DNS     string `json:"dns"`
	Name    string `json:"name"`
	Content string `json:"content"`
	TTL     int    `json:"ttl"`
}

RecordTXT represents a public DNS zone record TXT.

type RecordTXTCreateOpts

type RecordTXTCreateOpts struct {
	Name    string `json:"name"`
	Content string `json:"content" required:"true"`
	TTL     int    `json:"ttl,omitempty"`
}

RecordTXTCreateOpts specifies the attributes used to create a record TXT.

func (RecordTXTCreateOpts) Map

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

Map formats a RecordTXTCreateOpts structure into a request body.

type RecordTXTUpdateOpts

type RecordTXTUpdateOpts struct {
	Name    string `json:"name" required:"true"`
	Content string `json:"content" required:"true"`
	TTL     int    `json:"ttl,omitempty"`
}

RecordTXTUpdateOpts specifies the attributes used to update a record TXT.

func (RecordTXTUpdateOpts) Map

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

Map formats a RecordTXTUpdateOpts 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
}

UpdateResult is the result of a Update request. Call its Extract method to interpret the result as a record.

func Update

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

Update implements a record update request.

func (UpdateResult) ExtractA

func (r UpdateResult) ExtractA() (*RecordA, error)

ExtractA interprets a GetResult, CreateResult or UpdateResult as a RecordA. An error is returned if the original call or the extraction failed.

func (UpdateResult) ExtractAAAA

func (r UpdateResult) ExtractAAAA() (*RecordAAAA, error)

ExtractAAAA interprets a GetResult, CreateResult or UpdateResult as a RecordAAAA. An error is returned if the original call or the extraction failed.

func (UpdateResult) ExtractCNAME

func (r UpdateResult) ExtractCNAME() (*RecordCNAME, error)

ExtractA interprets a GetResult, CreateResult or UpdateResult as a RecordA. An error is returned if the original call or the extraction failed.

func (UpdateResult) ExtractMX

func (r UpdateResult) ExtractMX() (*RecordMX, error)

ExtractMX interprets a GetResult, CreateResult or UpdateResult as a RecordMX. An error is returned if the original call or the extraction failed.

func (UpdateResult) ExtractNS

func (r UpdateResult) ExtractNS() (*RecordNS, error)

ExtractNS interprets a GetResult, CreateResult or UpdateResult as a RecordNS. An error is returned if the original call or the extraction failed.

func (UpdateResult) ExtractSRV

func (r UpdateResult) ExtractSRV() (*RecordSRV, error)

ExtractSRV interprets a GetResult, CreateResult or UpdateResult as a RecordSRV. An error is returned if the original call or the extraction failed.

func (UpdateResult) ExtractTXT

func (r UpdateResult) ExtractTXT() (*RecordTXT, error)

ExtractTXT interprets a GetResult, CreateResult or UpdateResult as a RecordTXT. An error is returned if the original call or the extraction failed.

Jump to

Keyboard shortcuts

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