Documentation ¶
Index ¶
- func WithContext(ctx context.Context, credential string) context.Context
- type AddDNSSettingsAPIResponse
- type AddDNSSettingsResponse
- type AuthRequest
- type Authentication
- type Client
- type DNSRequest
- type DeleteDNSSettingsAPIResponse
- type DeleteDNSSettingsResponse
- type Fault
- type GetDNSSettingsAPIResponse
- type GetDNSSettingsResponse
- type Identifier
- type Item
- type KasAPIBody
- type KasAPIResponseEnvelope
- type KasAuthBody
- type KasAuthEnvelope
- type KasRequest
- type KasResponse
- type ReturnInfo
- type Trimmer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddDNSSettingsAPIResponse ¶
type AddDNSSettingsAPIResponse struct {
Response AddDNSSettingsResponse `json:"Response" mapstructure:"Response"`
}
type AddDNSSettingsResponse ¶
type AuthRequest ¶
type Authentication ¶ added in v4.12.0
type Client ¶
Client a KAS server client.
func (*Client) AddDNSSettings ¶
AddDNSSettings Creation of a DNS resource record.
func (*Client) DeleteDNSSettings ¶
DeleteDNSSettings Deleting a DNS Resource Record.
func (*Client) GetDNSSettings ¶
GetDNSSettings Reading out the DNS settings of a zone. - zone: host zone. - recordID: the ID of the resource record (optional).
type DNSRequest ¶
type DNSRequest struct { // ZoneHost the zone in question (must be a FQDN). ZoneHost string `json:"zone_host"` // RecordType the TYPE of the resource record (MX, A, AAAA etc.). RecordType string `json:"record_type"` // RecordName the NAME of the resource record. RecordName string `json:"record_name"` // RecordData the DATA of the resource record. RecordData string `json:"record_data"` // RecordAux the AUX of the resource record. RecordAux int `json:"record_aux"` }
type DeleteDNSSettingsAPIResponse ¶
type DeleteDNSSettingsAPIResponse struct {
Response DeleteDNSSettingsResponse `json:"Response"`
}
type Fault ¶
type Fault struct { Code string `xml:"faultcode"` Message string `xml:"faultstring"` Actor string `xml:"faultactor"` }
Fault a SOAP fault.
type GetDNSSettingsAPIResponse ¶
type GetDNSSettingsAPIResponse struct {
Response GetDNSSettingsResponse `json:"Response" mapstructure:"Response"`
}
type GetDNSSettingsResponse ¶
type GetDNSSettingsResponse struct { KasFloodDelay float64 `json:"KasFloodDelay" mapstructure:"KasFloodDelay"` ReturnInfo []ReturnInfo `json:"ReturnInfo" mapstructure:"ReturnInfo"` ReturnString string `json:"ReturnString"` }
type Identifier ¶ added in v4.12.0
Identifier generates credential tokens.
func NewIdentifier ¶ added in v4.12.0
func NewIdentifier(login string, password string) *Identifier
NewIdentifier creates a new Identifier.
func (*Identifier) Authentication ¶ added in v4.12.0
func (c *Identifier) Authentication(ctx context.Context, sessionLifetime int, sessionUpdateLifetime bool) (string, error)
Authentication Creates a credential token. - sessionLifetime: Validity of the token in seconds. - sessionUpdateLifetime: with `true` the session is extended with every request.
type Item ¶
type Item struct { Text string `xml:",chardata" json:"text,omitempty"` Type string `xml:"type,attr" json:"type,omitempty"` Raw string `xml:"nil,attr" json:"raw,omitempty"` Key *Item `xml:"key" json:"key,omitempty"` Value *Item `xml:"value" json:"value,omitempty"` Items []*Item `xml:"item" json:"item,omitempty"` }
Item an item of the KAS SOAP response.
type KasAPIBody ¶
type KasAPIBody struct { KasAPIResponse *KasResponse `xml:"KasApiResponse"` Fault *Fault `xml:"Fault"` }
type KasAPIResponseEnvelope ¶
type KasAPIResponseEnvelope struct { XMLName xml.Name `xml:"Envelope"` Body KasAPIBody `xml:"Body"` }
KasAPIResponseEnvelope a KAS envelope of the API response.
type KasAuthBody ¶
type KasAuthBody struct { KasAuthResponse *KasResponse `xml:"KasAuthResponse"` Fault *Fault `xml:"Fault"` }
type KasAuthEnvelope ¶
type KasAuthEnvelope struct { XMLName xml.Name `xml:"Envelope"` Body KasAuthBody `xml:"Body"` }
KasAuthEnvelope a KAS envelope of the authentication response.
type KasRequest ¶
type KasRequest struct { // Login the relevant KAS login. Login string `json:"kas_login,omitempty"` // AuthType the authentication type. AuthType string `json:"kas_auth_type,omitempty"` // AuthData the authentication data. AuthData string `json:"kas_auth_data,omitempty"` // Action API function. Action string `json:"kas_action,omitempty"` // RequestParams Parameters to the API function. RequestParams any `json:"KasRequestParams,omitempty"` }
type KasResponse ¶
type KasResponse struct {
Return *Item `xml:"return"`
}
KasResponse a KAS SOAP response.
type ReturnInfo ¶
type ReturnInfo struct { ID any `json:"record_id,omitempty" mapstructure:"record_id"` Zone string `json:"record_zone,omitempty" mapstructure:"record_zone"` Name string `json:"record_name,omitempty" mapstructure:"record_name"` Type string `json:"record_type,omitempty" mapstructure:"record_type"` Data string `json:"record_data,omitempty" mapstructure:"record_data"` Changeable string `json:"record_changeable,omitempty" mapstructure:"record_changeable"` Aux int `json:"record_aux,omitempty" mapstructure:"record_aux"` }