Documentation ¶
Index ¶
- Constants
- type APIKeyCredentials
- type Access
- type Auth
- type AuthData
- type Client
- func (c *Client) AddRecord(ctx context.Context, zoneID string, record Record) error
- func (c *Client) DeleteRecord(ctx context.Context, zoneID, recordID string) error
- func (c *Client) FindTxtRecord(ctx context.Context, fqdn string, zoneID string) (*Record, error)
- func (c *Client) GetHostedZoneID(ctx context.Context, fqdn string) (string, error)
- type Endpoint
- type HostedZone
- type Identifier
- type Identity
- type Record
- type Records
- type Role
- type ServiceCatalog
- type Tenant
- type Token
- type User
- type ZoneSearchResponse
Constants ¶
const DefaultIdentityURL = "https://identity.api.rackspacecloud.com/v2.0/tokens"
DefaultIdentityURL represents the Identity API endpoint to call.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKeyCredentials ¶
APIKeyCredentials api structure.
type Access ¶
type Access struct { Token Token `json:"token"` ServiceCatalog []ServiceCatalog `json:"serviceCatalog"` User User `json:"user"` }
Access api structure.
type Auth ¶
type Auth struct {
APIKeyCredentials `json:"RAX-KSKEY:apiKeyCredentials"`
}
Auth api structure.
type Client ¶
func (*Client) AddRecord ¶
AddRecord Adds one record to a specified domain. https://docs.rackspace.com/docs/cloud-dns/v1/api-reference/records#add-records
func (*Client) DeleteRecord ¶
DeleteRecord Deletes a record from the domain. https://docs.rackspace.com/docs/cloud-dns/v1/api-reference/records#delete-records
func (*Client) FindTxtRecord ¶
FindTxtRecord searches a DNS zone for a TXT record with a specific name.
type Endpoint ¶
type Endpoint struct { PublicURL string `json:"publicURL"` Region string `json:"region,omitempty"` TenantID string `json:"tenantId"` InternalURL string `json:"internalURL,omitempty"` }
Endpoint api structure.
type HostedZone ¶
HostedZone api structure.
type Identifier ¶
type Identifier struct {
// contains filtered or unexported fields
}
func NewIdentifier ¶
func NewIdentifier(httpClient *http.Client, baseURL string) *Identifier
NewIdentifier creates a new Identifier.
func (*Identifier) Login ¶
Login sends an authentication request. https://docs.rackspace.com/docs/cloud-dns/v1/getting-started/authenticate
type Record ¶
type Record struct { Name string `json:"name"` Type string `json:"type"` Data string `json:"data"` TTL int `json:"ttl,omitempty"` ID string `json:"id,omitempty"` }
Record represents a Rackspace DNS record.
type Records ¶
type Records struct { TotalEntries int `json:"totalEntries,omitempty"` Records []Record `json:"records,omitempty"` }
Records is the list of records sent/received from the DNS API.
type ServiceCatalog ¶
type ServiceCatalog struct { Name string `json:"name"` Type string `json:"type"` Endpoints []Endpoint `json:"endpoints"` }
ServiceCatalog service catalog.
type Token ¶
type Token struct { ID string `json:"id"` Expires string `json:"expires"` Tenant Tenant `json:"tenant"` RAXAUTHAuthenticatedBy []string `json:"RAX-AUTH:authenticatedBy"` }
Token api structure.
type ZoneSearchResponse ¶
type ZoneSearchResponse struct { TotalEntries int `json:"totalEntries"` HostedZones []HostedZone `json:"domains"` }
ZoneSearchResponse represents the response when querying Rackspace DNS zones.