Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAuthNoDomain = errors.New("the supplied domain failed authentication")
ErrAuthNoDomain indicates that a request failed authentication because the domain was not found. If encountered, a new domain needs to be reserved.
Functions ¶
This section is empty.
Types ¶
type AuthErrorResponse ¶
type Client ¶
type Client interface {
// ReserveDomain calls Uncloud DNS to reserve a new domain. It returns the domain, a token for authentication,
// and an error.
ReserveDomain(endpoint string) (string, string, error)
// CreateRecords calls Uncloud DNS to create or update DNS records based on the supplied RecordRequests
// for the specified domain.
CreateRecords(endpoint, domain, token string, records []RecordRequest) ([]RecordResponse, error)
}
Client handles interactions with the Uncloud DNS API service.
type DomainResponse ¶
type RecordRequest ¶
type RecordRequest struct {
Name string `json:"name,omitempty"`
Type RecordType `json:"type,omitempty"`
Values []string `json:"values,omitempty"`
}
type RecordResponse ¶
type RecordResponse struct {
RecordRequest
FQDN string `json:"fqdn,omitempty"`
}
type RecordType ¶
type RecordType string
const ( RecordTypeA RecordType = "A" RecordTypeAAAA RecordType = "AAAA" )
Click to show internal directories.
Click to hide internal directories.