Documentation ¶
Overview ¶
Package netcup implements a DNS Provider for solving the DNS-01 challenge using the netcup DNS API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { HTTPClient *http.Client BaseURL string // contains filtered or unexported fields }
Client netcup DNS client
func (*Client) GetDNSRecords ¶
GetDNSRecords retrieves all dns records of an DNS-Zone as specified by the netcup WSDL returns an array of DNSRecords https://ccp.netcup.net/run/webservice/servers/endpoint.php
func (*Client) Login ¶
Login performs the login as specified by the netcup WSDL returns sessionID needed to perform remaining actions https://ccp.netcup.net/run/webservice/servers/endpoint.php
func (*Client) Logout ¶
Logout performs the logout with the supplied sessionID as specified by the netcup WSDL https://ccp.netcup.net/run/webservice/servers/endpoint.php
func (*Client) UpdateDNSRecord ¶
UpdateDNSRecord performs an update of the DNSRecords as specified by the netcup WSDL https://ccp.netcup.net/run/webservice/servers/endpoint.php
type Config ¶
type Config struct { Key string Password string Customer string TTL int PropagationTimeout time.Duration PollingInterval time.Duration 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 netcup. Credentials must be passed in the environment variables: NETCUP_CUSTOMER_NUMBER, NETCUP_API_KEY, NETCUP_API_PASSWORD
func NewDNSProviderConfig ¶
func NewDNSProviderConfig(config *Config) (*DNSProvider, error)
NewDNSProviderConfig return a DNSProvider instance configured for netcup.
func NewDNSProviderCredentials ¶
func NewDNSProviderCredentials(customer, key, password string) (*DNSProvider, error)
NewDNSProviderCredentials uses the supplied credentials to return a DNSProvider instance configured for netcup. Deprecated
func (*DNSProvider) CleanUp ¶
func (d *DNSProvider) CleanUp(domainName, token, keyAuth string) error
CleanUp removes the TXT record matching the specified parameters
func (*DNSProvider) Present ¶
func (d *DNSProvider) Present(domainName, 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 int `json:"id,string,omitempty"` Hostname string `json:"hostname"` RecordType string `json:"type"` Priority string `json:"priority,omitempty"` Destination string `json:"destination"` DeleteRecord bool `json:"deleterecord,omitempty"` State string `json:"state,omitempty"` TTL int `json:"ttl,omitempty"` }
DNSRecord as specified in netcup WSDL https://ccp.netcup.net/run/webservice/servers/endpoint.php#Dnsrecord
type DNSRecordSet ¶
type DNSRecordSet struct {
DNSRecords []DNSRecord `json:"dnsrecords"`
}
DNSRecordSet as specified in netcup WSDL needed in UpdateDNSRecordsRequest https://ccp.netcup.net/run/webservice/servers/endpoint.php#Dnsrecordset
type InfoDNSRecordsRequest ¶ added in v1.2.0
type InfoDNSRecordsRequest struct { DomainName string `json:"domainname"` CustomerNumber string `json:"customernumber"` APIKey string `json:"apikey"` APISessionID string `json:"apisessionid"` ClientRequestID string `json:"clientrequestid,omitempty"` }
InfoDNSRecordsRequest as specified in netcup WSDL https://ccp.netcup.net/run/webservice/servers/endpoint.php#infoDnsRecords
type InfoDNSRecordsResponse ¶ added in v1.2.0
type InfoDNSRecordsResponse struct { APISessionID string `json:"apisessionid"` DNSRecords []DNSRecord `json:"dnsrecords,omitempty"` }
InfoDNSRecordsResponse response to infoDnsRecords action.
type LoginRequest ¶ added in v1.2.0
type LoginRequest struct { CustomerNumber string `json:"customernumber"` APIKey string `json:"apikey"` APIPassword string `json:"apipassword"` ClientRequestID string `json:"clientrequestid,omitempty"` }
LoginRequest as specified in netcup WSDL https://ccp.netcup.net/run/webservice/servers/endpoint.php#login
type LoginResponse ¶ added in v1.2.0
type LoginResponse struct {
APISessionID string `json:"apisessionid"`
}
LoginResponse response to login action.
type LogoutRequest ¶ added in v1.2.0
type LogoutRequest struct { CustomerNumber string `json:"customernumber"` APIKey string `json:"apikey"` APISessionID string `json:"apisessionid"` ClientRequestID string `json:"clientrequestid,omitempty"` }
LogoutRequest as specified in netcup WSDL https://ccp.netcup.net/run/webservice/servers/endpoint.php#logout
type Request ¶
type Request struct { Action string `json:"action"` Param interface{} `json:"param"` }
Request wrapper as specified in netcup wiki needed for every request to netcup API around *Msg https://www.netcup-wiki.de/wiki/CCP_API#Anmerkungen_zu_JSON-Requests
type ResponseMsg ¶
type ResponseMsg struct { ServerRequestID string `json:"serverrequestid"` ClientRequestID string `json:"clientrequestid,omitempty"` Action string `json:"action"` Status string `json:"status"` StatusCode int `json:"statuscode"` ShortMessage string `json:"shortmessage"` LongMessage string `json:"longmessage"` ResponseData json.RawMessage `json:"responsedata,omitempty"` }
ResponseMsg as specified in netcup WSDL https://ccp.netcup.net/run/webservice/servers/endpoint.php#Responsemessage
func (*ResponseMsg) Error ¶ added in v1.2.0
func (r *ResponseMsg) Error() string
type UpdateDNSRecordsRequest ¶ added in v1.2.0
type UpdateDNSRecordsRequest struct { DomainName string `json:"domainname"` CustomerNumber string `json:"customernumber"` APIKey string `json:"apikey"` APISessionID string `json:"apisessionid"` ClientRequestID string `json:"clientrequestid,omitempty"` DNSRecordSet DNSRecordSet `json:"dnsrecordset"` }
UpdateDNSRecordsRequest as specified in netcup WSDL https://ccp.netcup.net/run/webservice/servers/endpoint.php#updateDnsRecords