dns: gomodules.xyz/dns/cloudflare Index | Files

package cloudflare

import "gomodules.xyz/dns/cloudflare"

Package cloudflare implements a DNS provider for solving the DNS-01 challenge using cloudflare DNS.


Package Files


type DNSProvider Uses

type DNSProvider struct {
    // contains filtered or unexported fields

DNSProvider is an implementation of the acme.ChallengeProvider interface

func Default Uses

func Default() (*DNSProvider, error)

NewDNSProvider returns a DNSProvider instance configured for cloudflare. Credentials must be passed in the environment variables: CLOUDFLARE_EMAIL and CLOUDFLARE_API_KEY.

func New Uses

func New(opt Options) (*DNSProvider, error)

NewDNSProviderCredentials uses the supplied credentials to return a DNSProvider instance configured for cloudflare.

func (*DNSProvider) DeleteARecord Uses

func (c *DNSProvider) DeleteARecord(domain string, ip string) error

func (*DNSProvider) DeleteARecords Uses

func (c *DNSProvider) DeleteARecords(domain string) error

func (*DNSProvider) EnsureARecord Uses

func (c *DNSProvider) EnsureARecord(domain string, ip string) error

func (*DNSProvider) Timeout Uses

func (c *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 Options Uses

type Options struct {
    Email  string `json:"email" envconfig:"CLOUDFLARE_EMAIL" form:"cloudflare_email"`
    APIKey string `json:"api_key" envconfig:"CLOUDFLARE_API_KEY" form:"cloudflare_api_key"`

Package cloudflare imports 7 packages (graph) and is imported by 3 packages. Updated 2019-06-08. Refresh now. Tools for package owners.