Documentation
¶
Overview ¶
Package nifcloud implements a DNS provider for solving the DNS-01 challenge using NIFCLOUD DNS.
Package nifcloud implements a DNS provider for solving the DNS-01 challenge using NIFCLOUD DNS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Change ¶
type Change struct {
Action string `xml:"Action"`
ResourceRecordSet ResourceRecordSet `xml:"ResourceRecordSet"`
}
Change is the information for each resource record set that you want to change.
type ChangeBatch ¶
ChangeBatch is the information for a change request.
type ChangeInfo ¶
type ChangeInfo struct {
ID string `xml:"Id"`
Status string `xml:"Status"`
SubmittedAt string `xml:"SubmittedAt"`
}
ChangeInfo is A complex type that describes change information about changes made to your hosted zone.
type ChangeResourceRecordSetsRequest ¶
type ChangeResourceRecordSetsRequest struct {
XMLNs string `xml:"xmlns,attr"`
ChangeBatch ChangeBatch `xml:"ChangeBatch"`
}
ChangeResourceRecordSetsRequest is a complex type that contains change information for the resource record set.
type ChangeResourceRecordSetsResponse ¶
type ChangeResourceRecordSetsResponse struct {
ChangeInfo ChangeInfo `xml:"ChangeInfo"`
}
ChangeResourceRecordSetsResponse is a complex type containing the response for the request.
type Client ¶
type Client struct {
BaseURL string
HTTPClient *http.Client
// contains filtered or unexported fields
}
Client client of NIFCLOUD DNS
func (*Client) ChangeResourceRecordSets ¶
func (c *Client) ChangeResourceRecordSets(hostedZoneID string, input ChangeResourceRecordSetsRequest) (*ChangeResourceRecordSetsResponse, error)
ChangeResourceRecordSets Call ChangeResourceRecordSets API and return response.
type Config ¶
type Config struct {
BaseURL string
AccessKey string
SecretKey string
PropagationTimeout time.Duration
PollingInterval time.Duration
TTL int
HTTPClient *http.Client
}
Config is used to configure the creation of the DNSProvider
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
NewDefaultConfig returns a default configuration for the DNSProvider
type DNSProvider ¶
type DNSProvider struct {
// contains filtered or unexported fields
}
DNSProvider implements the acme.ChallengeProvider interface
func NewDNSProvider ¶
func NewDNSProvider() (*DNSProvider, error)
NewDNSProvider returns a DNSProvider instance configured for the NIFCLOUD DNS service. Credentials must be passed in the environment variables: NIFCLOUD_ACCESS_KEY_ID and NIFCLOUD_SECRET_ACCESS_KEY.
func NewDNSProviderConfig ¶
func NewDNSProviderConfig(config *Config) (*DNSProvider, error)
NewDNSProviderConfig return a DNSProvider instance configured for NIFCLOUD.
func NewDNSProviderCredentials ¶
func NewDNSProviderCredentials(httpClient *http.Client, endpoint, accessKey, secretKey string) (*DNSProvider, error)
NewDNSProviderCredentials uses the supplied credentials to return a DNSProvider instance configured for NIFCLOUD. Deprecated
func (*DNSProvider) CleanUp ¶
func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error
CleanUp removes the TXT record matching the specified parameters
func (*DNSProvider) Present ¶
func (d *DNSProvider) Present(domain, token, keyAuth string) error
Present creates a TXT record using the specified parameters
func (*DNSProvider) Timeout ¶
func (d *DNSProvider) Timeout() (timeout, interval time.Duration)
Timeout returns the timeout and interval to use when checking for DNS propagation. Adjusting here to cope with spikes in propagation times.
type ErrorResponse ¶
type ErrorResponse struct {
Error struct {
Type string `xml:"Type"`
Message string `xml:"Message"`
Code string `xml:"Code"`
} `xml:"Error"`
RequestID string `xml:"RequestId"`
}
ErrorResponse is the information for any errors.
type GetChangeResponse ¶
type GetChangeResponse struct {
ChangeInfo ChangeInfo `xml:"ChangeInfo"`
}
GetChangeResponse is a complex type that contains the ChangeInfo element.
type ResourceRecord ¶
type ResourceRecord struct {
Value string `xml:"Value"`
}
ResourceRecord is the information specific to the resource record.
type ResourceRecordSet ¶
type ResourceRecordSet struct {
Name string `xml:"Name"`
Type string `xml:"Type"`
TTL int `xml:"TTL"`
ResourceRecords ResourceRecords `xml:"ResourceRecords"`
}
ResourceRecordSet is the information about the resource record set to create or delete.
type ResourceRecords ¶
type ResourceRecords struct {
ResourceRecord []ResourceRecord `xml:"ResourceRecord"`
}
ResourceRecords is array of ResourceRecord.