Documentation
¶
Overview ¶
Package recordsets provides information and interaction with the zone API resource for the OpenStack DNS service.
For more information, see: http://developer.openstack.org/api-ref/dns/#recordsets
Index ¶
- func ListByZone(client *gophercloud.ServiceClient, zoneID string, opts ListOptsBuilder) pagination.Pager
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type GetResult
- type ListOpts
- type ListOptsBuilder
- type RecordSet
- type RecordSetPage
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListByZone ¶
func ListByZone(client *gophercloud.ServiceClient, zoneID string, opts ListOptsBuilder) pagination.Pager
ListByZone implements the recordset list request.
Types ¶
type CreateOpts ¶
type CreateOpts struct { // Name is the name of the RecordSet. Name string `json:"name" required:"true"` // Description is a description of the RecordSet. Description string `json:"description,omitempty"` // Records are the DNS records of the RecordSet. Records []string `json:"records,omitempty"` // TTL is the time to live of the RecordSet. TTL int `json:"ttl,omitempty"` // Type is the RRTYPE of the RecordSet. Type string `json:"type,omitempty"` }
CreateOpts specifies the base attributes that may be used to create a RecordSet.
func (CreateOpts) ToRecordSetCreateMap ¶
func (opts CreateOpts) ToRecordSetCreateMap() (map[string]interface{}, error)
ToRecordSetCreateMap formats an CreateOpts structure into a request body.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional attributes to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult is the deferred result of a Create call.
func Create ¶
func Create(client *gophercloud.ServiceClient, zoneID string, opts CreateOptsBuilder) (r CreateResult)
Create creates a recordset in a given zone.
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
DeleteResult is the deferred result of an Delete call.
func Delete ¶
func Delete(client *gophercloud.ServiceClient, zoneID string, rrsetID string) (r DeleteResult)
Delete removes an existing RecordSet.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult is the deferred result of a Get call.
func Get ¶
func Get(client *gophercloud.ServiceClient, zoneID string, rrsetID string) (r GetResult)
Get implements the recordset get request.
type ListOpts ¶
type ListOpts struct { // Integer value for the limit of values to return. Limit int `q:"limit"` // UUID of the recordset at which you want to set a marker. Marker string `q:"marker"` Data string `q:"data"` Description string `q:"description"` Name string `q:"name"` SortDir string `q:"sort_dir"` SortKey string `q:"sort_key"` Status string `q:"status"` TTL int `q:"ttl"` Type string `q:"type"` ZoneID string `q:"zone_id"` }
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. Marker and Limit are used for pagination. https://developer.openstack.org/api-ref/dns/
func (ListOpts) ToRecordSetListQuery ¶
ToRecordSetListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.
type RecordSet ¶
type RecordSet struct { // ID is the unique ID of the recordset ID string `json:"id"` // ZoneID is the ID of the zone the recordset belongs to. ZoneID string `json:"zone_id"` // ProjectID is the ID of the project that owns the recordset. ProjectID string `json:"project_id"` // Name is the name of the recordset. Name string `json:"name"` // ZoneName is the name of the zone the recordset belongs to. ZoneName string `json:"zone_name"` // Type is the RRTYPE of the recordset. Type string `json:"type"` // Records are the DNS records of the recordset. Records []string `json:"records"` // TTL is the time to live of the recordset. TTL int `json:"ttl"` // Status is the status of the recordset. Status string `json:"status"` // Action is the current action in progress of the recordset. Action string `json:"action"` // Description is the description of the recordset. Description string `json:"description"` // Version is the revision of the recordset. Version int `json:"version"` // CreatedAt is the date when the recordset was created. CreatedAt time.Time `json:"-"` // UpdatedAt is the date when the recordset was updated. UpdatedAt time.Time `json:"-"` // Links includes HTTP references to the itself, // useful for passing along to other APIs that might want a recordset reference. Links []gophercloud.Link `json:"-"` }
func ExtractRecordSets ¶
func ExtractRecordSets(r pagination.Page) ([]RecordSet, error)
ExtractRecordSets extracts a slice of RecordSets from a Collection acquired from List.
func (*RecordSet) UnmarshalJSON ¶
type RecordSetPage ¶
type RecordSetPage struct {
pagination.LinkedPageBase
}
RecordSetPage is a single page of RecordSet results.
func (RecordSetPage) IsEmpty ¶
func (r RecordSetPage) IsEmpty() (bool, error)
IsEmpty returns true if the page contains no results.
type UpdateOpts ¶
type UpdateOpts struct { Description string `json:"description,omitempty"` TTL int `json:"ttl,omitempty"` Records []string `json:"records,omitempty"` }
UpdateOpts specifies the base attributes that may be updated on an existing RecordSet.
func (UpdateOpts) ToRecordSetUpdateMap ¶
func (opts UpdateOpts) ToRecordSetUpdateMap() (map[string]interface{}, error)
ToRecordSetUpdateMap formats an UpdateOpts structure into a request body.
type UpdateOptsBuilder ¶
UpdateOptsBuilder allows extensions to add additional attributes to the Update request.
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
UpdateResult is the deferred result of an Update call.
func Update ¶
func Update(client *gophercloud.ServiceClient, zoneID string, rrsetID string, opts UpdateOptsBuilder) (r UpdateResult)
Update updates a recordset in a given zone