Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDNSRecordIdx ¶
GetDNSRecordIdx searches a given array of DNSRecords for a given DNSRecord equivalence is determined by Destination and RecortType attributes returns index of given DNSRecord in given array of DNSRecords.
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 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 ¶
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 ¶
type InfoDNSRecordsResponse struct { APISessionID string `json:"apisessionid"` DNSRecords []DNSRecord `json:"dnsrecords,omitempty"` }
InfoDNSRecordsResponse response to infoDnsRecords action.
type LoginRequest ¶
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 ¶
type LoginResponse struct {
APISessionID string `json:"apisessionid"`
}
LoginResponse response to login action.
type LogoutRequest ¶
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 ¶
func (r *ResponseMsg) Error() string
type UpdateDNSRecordsRequest ¶
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