v2.7.2+incompatible Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2019 License: MIT Imports: 12 Imported by: 62



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



This section is empty.


This section is empty.


This section is empty.


type APIError

type APIError struct {
	Code          int      `json:"code"`
	ContextObject string   `json:"contextObject"`
	ContextPath   string   `json:"contextPath"`
	Details       []string `json:"details"`
	Text          string   `json:"text"`
	Value         string   `json:"value"`

APIError represents an error in an API response.

type BaseRequest

type BaseRequest struct {
	AuthToken string `json:"authToken"`

BaseRequest Common request struct.

type BaseResponse

type BaseResponse struct {
	Errors   []APIError `json:"errors"`
	Metadata Metadata   `json:"metadata"`
	Warnings []string   `json:"warnings"`
	Status   string     `json:"status"`

BaseResponse Common response struct.

type Config

type Config struct {
	APIKey             string
	ZoneName           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 is an implementation of the acme.ChallengeProvider interface

func NewDNSProvider

func NewDNSProvider() (*DNSProvider, error)

NewDNSProvider returns a DNSProvider instance configured for Credentials must be passed in the environment variables: HOSTINGDE_ZONE_NAME and HOSTINGDE_API_KEY

func NewDNSProviderConfig

func NewDNSProviderConfig(config *Config) (*DNSProvider, error)

NewDNSProviderConfig return a DNSProvider instance configured for

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 to fulfill the dns-01 challenge

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 DNSRecord

type DNSRecord struct {
	ID               string `json:"id,omitempty"`
	ZoneID           string `json:"zoneId,omitempty"`
	RecordTemplateID string `json:"recordTemplateId,omitempty"`
	Name             string `json:"name,omitempty"`
	Type             string `json:"type,omitempty"`
	Content          string `json:"content,omitempty"`
	TTL              int    `json:"ttl,omitempty"`
	Priority         int    `json:"priority,omitempty"`
	LastChangeDate   string `json:"lastChangeDate,omitempty"`

DNSRecord The DNS Record object is part of a zone. It is used to manage DNS resource records.

type Filter

type Filter struct {
	Field string `json:"field"`
	Value string `json:"value"`

Filter is used to filter FindRequests to the API.

type Metadata

type Metadata struct {
	ClientTransactionID string `json:"clientTransactionId"`
	ServerTransactionID string `json:"serverTransactionId"`

Metadata represents the metadata in an API response.

type SOAValues

type SOAValues struct {
	Refresh     int `json:"refresh"`
	Retry       int `json:"retry"`
	Expire      int `json:"expire"`
	TTL         int `json:"ttl"`
	NegativeTTL int `json:"negativeTtl"`

SOAValues The SOA values object contains the time (seconds) used in a zone’s SOA record.

type Sort

type Sort struct {
	Field string `json:"zoneName"`
	Order string `json:"order"`

Sort is used to sort FindRequests from the API.

type Zone

type Zone struct {
	Records    []DNSRecord `json:"records"`
	ZoneConfig ZoneConfig  `json:"zoneConfig"`

Zone The Zone Object.

type ZoneConfig

type ZoneConfig struct {
	ID                    string          `json:"id"`
	AccountID             string          `json:"accountId"`
	Status                string          `json:"status"`
	Name                  string          `json:"name"`
	NameUnicode           string          `json:"nameUnicode"`
	MasterIP              string          `json:"masterIp"`
	Type                  string          `json:"type"`
	EMailAddress          string          `json:"emailAddress"`
	ZoneTransferWhitelist []string        `json:"zoneTransferWhitelist"`
	LastChangeDate        string          `json:"lastChangeDate"`
	DNSServerGroupID      string          `json:"dnsServerGroupId"`
	DNSSecMode            string          `json:"dnsSecMode"`
	SOAValues             *SOAValues      `json:"soaValues,omitempty"`
	TemplateValues        json.RawMessage `json:"templateValues,omitempty"`

ZoneConfig The ZoneConfig object defines a zone.

type ZoneConfigsFindRequest

type ZoneConfigsFindRequest struct {
	Filter Filter `json:"filter"`
	Limit  int    `json:"limit"`
	Page   int    `json:"page"`
	Sort   *Sort  `json:"sort,omitempty"`

ZoneConfigsFindRequest represents a API ZonesFind request.

type ZoneConfigsFindResponse

type ZoneConfigsFindResponse struct {
	Response struct {
		Limit        int          `json:"limit"`
		Page         int          `json:"page"`
		TotalEntries int          `json:"totalEntries"`
		TotalPages   int          `json:"totalPages"`
		Type         string       `json:"type"`
		Data         []ZoneConfig `json:"data"`
	} `json:"response"`

ZoneConfigsFindResponse represents the API response for ZoneConfigsFind.

type ZoneUpdateRequest

type ZoneUpdateRequest struct {
	ZoneConfig      `json:"zoneConfig"`
	RecordsToAdd    []DNSRecord `json:"recordsToAdd"`
	RecordsToDelete []DNSRecord `json:"recordsToDelete"`

ZoneUpdateRequest represents a API ZoneUpdate request.

type ZoneUpdateResponse

type ZoneUpdateResponse struct {
	Response Zone `json:"response"`

ZoneUpdateResponse represents a response from the API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL