namecheap

package module
v0.0.0-...-d35abdb Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

README

GoNamecheap

Rename config.sample.json to config.json

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHost

func AddHost(SLD string, TLD string, conf Config, newHost Host) error

func DelHost

func DelHost(SLD string, TLD string, conf Config, name string, recordType string) error

func SetHosts

func SetHosts(SLD string, TLD string, conf Config, hosts []Host) error

Types

type Config

type Config struct {
	User   string `json:"user"`
	ApiKey string `json:"api_key"`
	IP     string `json:"ip"`
}

type Host

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"`
}

func GetHosts

func GetHosts(SLD string, TLD string, conf Config) ([]Host, error)

type Hosts

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"`
}

Jump to

Keyboard shortcuts

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