Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *gophercloud.ServiceClient, domID string, opts ListOptsBuilder) pagination.Pager
Types ¶
type CreateOpts ¶
type CreateOpts struct { // Name is the name of the Record. Name string `json:"name"` Type string `json:"type"` Data string `json:"data"` TTL uint `json:"ttl,omitempty"` Comment string `json:"comment,omitempty"` Priority uint `json:"priority,omitempty"` }
CreateOpts contain the values necessary to create a record
type CreateResult ¶
type CreateResult struct {
gophercloud.Result
}
CreateResult is the result of a Create operation
func Create ¶
func Create(client *gophercloud.ServiceClient, domID string, opts CreateOpts) (r CreateResult)
Create creates a requested record
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*RecordList, error)
Extract interprets a CreateResult as a Record.
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
method to determine if the call succeeded or failed.
func Delete ¶
func Delete(client *gophercloud.ServiceClient, domID string, id string) (r DeleteResult)
Delete deletes the specified record ID.
type GetResult ¶
type GetResult struct {
gophercloud.Result
}
GetResult is the response from a Get operation. Call its Extract method to interpret it as a Record.
func Get ¶
func Get(client *gophercloud.ServiceClient, domID string, id string) (r GetResult)
Get returns data about a specific record by its ID.
func (GetResult) Extract ¶
func (r GetResult) Extract() (*RecordShow, error)
Extract interprets a GetResult as a Record.
type ListOpts ¶
type ListOpts struct { // Name is the name of the Record. Name string `q:"name"` Data string `q:"data"` Type string `q:"type"` }
ListOpts contain options filtering Records returned from a call to List.
func (ListOpts) ToRecordListQuery ¶
ToRecordListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.
type RecordList ¶
type RecordList struct { // ID is the unique ID of a record. ID string // name is the record name Name string // type is the record type Type string // data is the record data Data string // TTL of the record TTL uint // priority for SRV and MX records Priority uint // optional comment for the record Comment string }
RecordList represents a record returned by the CloudDNS API.
func ExtractRecords ¶
func ExtractRecords(r pagination.Page) ([]RecordList, error)
ExtractRecords converts a page of List results into a slice of usable Record structs.
type RecordPage ¶
type RecordPage struct {
pagination.LinkedPageBase
}
RecordPage contains a single page of all Records returne from a List operation. Use ExtractRecords to convert it into a slice of usable structs.
func (RecordPage) IsEmpty ¶
func (r RecordPage) IsEmpty() (bool, error)
IsEmpty returns true if response contains no Record results.
func (RecordPage) NextPageURL ¶
func (page RecordPage) NextPageURL() (string, error)
NextPageURL uses the response's embedded link reference to navigate to the next page of results.
type RecordShow ¶
type RecordShow struct { ID string `json:"id"` Name string `json:"name"` Type string `json:"type"` Data string `json:"data"` TTL uint `json:"ttl"` Priority uint `json:"priority"` Comment string `json:"comment"` Updated string `json:"updated"` Created string `json:"created"` }
RecordShow represents a record returned by the CloudDNS API.
type UpdateOpts ¶
type UpdateOpts struct { Name string `json:"name"` Data string `json:"data"` TTL uint `json:"ttl,omitempty"` Comment string `json:"comment,omitempty"` Priority uint `json:"priority,omitempty"` }
UpdateOpts contain the values necessary to create a record
type UpdateResult ¶
type UpdateResult struct {
gophercloud.ErrResult
}
method to determine if the call succeeded or failed.
func Update ¶
func Update(client *gophercloud.ServiceClient, domID string, record *RecordShow, opts UpdateOpts) (r UpdateResult)
Update updates a requested record