package
module
Version:
v0.0.0-...-d35abdb
Opens a new window with list of versions in this module.
Published: Jul 21, 2021
License: GPL-3.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
GoNamecheap
Rename config.sample.json to config.json
Documentation
¶
-
func AddHost(SLD string, TLD string, conf Config, newHost Host) error
-
func DelHost(SLD string, TLD string, conf Config, name string, recordType string) error
-
func SetHosts(SLD string, TLD string, conf Config, hosts []Host) error
-
type Config
-
type Host
-
type Hosts
type Config struct {
User string `json:"user"`
ApiKey string `json:"api_key"`
IP string `json:"ip"`
}
type Host struct {
XMLName xml.Name `xml:"host"`
HostId string `xml:"HostId"`
Name string `xml:"Name"`
Type string `xml:"Type"`
Address string `xml:"Address"`
MXPref string `xml:"MXPref"`
TTL int `xml:"TTL"`
AssociatedAppTitle string `xml:"AssociatedAppTitle"`
FriendlyName string `xml:"FriendlyName"`
IsActive bool `xml:"IsActive"`
IsDDNSEnabled bool `xml:"IsDDNSEnabled"`
}
type Hosts struct {
XMLName xml.Name `xml:"hosts"`
Domain string `xml:"Domain,attr"`
EmailType string `xml:"EmailType,attr"`
IsUsingOurDNS bool `xml:"IsUsingOurDNS,attr"`
Hosts []Host `xml:"Host"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.