Versions in this module Expand all Collapse all v1 v1.0.1 Dec 23, 2022 v1.0.0 Dec 21, 2022 Changes in this version + const ErrAPIInvocation + const ErrHTTPRequest + const ErrIllegalArgument + const ErrInvalidOptions + const ErrMultipleCredentials + type APIBool bool + func (b *APIBool) UnmarshalJSON(data []byte) error + func (b APIBool) MarshalJSON() ([]byte, error) + type AccountService struct + func (svc *AccountService) GetBalance(ctx context.Context) (float64, error) + func (svc *AccountService) GetCurrentIP(ctx context.Context) (net.IP, error) + func (svc *AccountService) Login(ctx context.Context) (result StatusResult, err error) + type Auth struct + Password string + SubUserID int + SubUserName string + Type AuthType + UserID int + func NewAuth() *Auth + func (auth *Auth) GetParams() HTTPParams + type AuthType int + const AuthTypeNone + const AuthTypeSubUserID + const AuthTypeSubUserName + const AuthTypeUserID + type CAA struct + Flag uint8 + Type string + Value string + type Client struct + Account *AccountService + Records *RecordService + Zones *ZoneService + func New(options ...Option) (*Client, error) + type DynamicURL struct + Host string + URL string + type HTTPParams map[string]interface + type NAPTR struct + Flags string + Order uint16 + Preference uint16 + Regexp string + Replacement string + Service string + type Nameserver struct + CountryCode string + DDoSProtected APIBool + IPv4 net.IP + IPv6 net.IP + Location string + Name string + Type string + type Option func(api *Client) error + func AuthSubUserID(id int, password string) Option + func AuthSubUserName(user string, password string) Option + func AuthUserID(id int, password string) Option + func BaseURL(baseURL string) Option + func HTTPClient(httpClient *http.Client) Option + func Headers(headers http.Header) Option + func Params(params HTTPParams) Option + func UserAgent(userAgent string) Option + type RP struct + Mail string + TXT string + type Record struct + GeoDNSLocationID int + Host string + ID int + IsActive APIBool + Priority uint16 + Record string + RecordType RecordType + TTL int + func NewRecord(recordType RecordType, host, record string, ttl int) Record + func NewRecordA(host, target string, ttl int) Record + func NewRecordAAAA(host, target string, ttl int) Record + func NewRecordALIAS(host, target string, ttl int) Record + func NewRecordCAA(host string, flag uint8, caaType, value string, ttl int) Record + func NewRecordCNAME(host, target string, ttl int) Record + func NewRecordMX(host string, priority uint16, target string, ttl int) Record + func NewRecordNAPTR(host string, order, preference uint16, ...) Record + func NewRecordNS(host, target string, ttl int) Record + func NewRecordPTR(host, target string, ttl int) Record + func NewRecordRP(host string, mail, txt string, ttl int) Record + func NewRecordSRV(host string, priority, weight, port uint16, target string, ttl int) Record + func NewRecordSSHFP(host string, algorithm, fpType uint8, fingerprint string, ttl int) Record + func NewRecordTLSA(host string, usage, selector, matchingType uint8, value string, ttl int) Record + func NewRecordTXT(host, value string, ttl int) Record + func NewRecordWebRedirect(host, target string, options WebRedirect, ttl int) Record + func (rec Record) AsParams() HTTPParams + type RecordFormat int + const RecordFormatBIND + const RecordFormatTinyDNS + type RecordMap map[int]Record + func (rm RecordMap) AsSlice() []Record + type RecordService struct + func (svc *RecordService) AvailableRecordTypes(ctx context.Context, zoneType ZoneType, zoneKind ZoneKind) (result []string, err error) + func (svc *RecordService) AvailableTTLs(ctx context.Context, zoneName string) (result []int, err error) + func (svc *RecordService) ChangeDynamicURL(ctx context.Context, zoneName string, recordID int) (result DynamicURL, err error) + func (svc *RecordService) CopyFromZone(ctx context.Context, targetZoneName, sourceZoneName string, overwrite bool) (result StatusResult, err error) + func (svc *RecordService) Create(ctx context.Context, zoneName string, record Record) (result StatusResult, err error) + func (svc *RecordService) Delete(ctx context.Context, zoneName string, recordID int) (result StatusResult, err error) + func (svc *RecordService) DisableDynamicURL(ctx context.Context, zoneName string, recordID int) (result StatusResult, err error) + func (svc *RecordService) Export(ctx context.Context, zoneName string) (result RecordsExport, err error) + func (svc *RecordService) GetDynamicURL(ctx context.Context, zoneName string, recordID int) (result DynamicURL, err error) + func (svc *RecordService) GetSOA(ctx context.Context, zoneName string) (result SOA, err error) + func (svc *RecordService) Import(ctx context.Context, zoneName string, format RecordFormat, content string, ...) (result StatusResult, err error) + func (svc *RecordService) ImportTransfer(ctx context.Context, zoneName, server string) (result StatusResult, err error) + func (svc *RecordService) List(ctx context.Context, zoneName string) (result RecordMap, err error) + func (svc *RecordService) Search(ctx context.Context, zoneName, host string, recordType RecordType) (result RecordMap, err error) + func (svc *RecordService) SetActive(ctx context.Context, zoneName string, recordID int, isActive bool) (result StatusResult, err error) + func (svc *RecordService) Update(ctx context.Context, zoneName string, recordID int, record Record) (result StatusResult, err error) + func (svc *RecordService) UpdateSOA(ctx context.Context, zoneName string, soa SOA) (result StatusResult, err error) + type RecordType string + const RecordTypeA + const RecordTypeAAAA + const RecordTypeALIAS + const RecordTypeCAA + const RecordTypeCNAME + const RecordTypeMX + const RecordTypeNAPTR + const RecordTypeNS + const RecordTypePTR + const RecordTypeRP + const RecordTypeSRV + const RecordTypeSSHFP + const RecordTypeTLSA + const RecordTypeTXT + const RecordTypeUnknown + const RecordTypeWebRedirect + type RecordsExport struct + Zone string + type SOA struct + AdminMail string + DefaultTTL int + Expire int + PrimaryNS string + Refresh int + Retry int + Serial int + func (soa SOA) AsParams() HTTPParams + type SRV struct + Port uint16 + Weight uint16 + type SSHFP struct + Algorithm uint8 + Type uint8 + type StatusResult struct + Status string + StatusDescription string + StatusMessage string + type TLSA struct + MatchingType uint8 + Selector uint8 + Usage uint8 + type WebRedirect struct + FrameDescription string + FrameKeywords string + FrameTitle string + IsFrame APIBool + MobileMeta APIBool + RedirectType int + SavePath APIBool + type Zone struct + IsActive APIBool + Kind ZoneKind + Name string + Type ZoneType + type ZoneKind int + const ZoneKindDomain + const ZoneKindIPv4 + const ZoneKindIPv6 + const ZoneKindUnknown + func (zk *ZoneKind) UnmarshalJSON(data []byte) error + type ZoneService struct + func (svc *ZoneService) AvailableNameservers(ctx context.Context) (result []Nameserver, err error) + func (svc *ZoneService) Get(ctx context.Context, zoneName string) (result Zone, err error) + func (svc *ZoneService) GetUpdateStatus(ctx context.Context, zoneName string) (result []ZoneUpdateStatus, err error) + func (svc *ZoneService) GetUsage(ctx context.Context) (result ZoneUsage, err error) + func (svc *ZoneService) IsUpdated(ctx context.Context, zoneName string) (result bool, err error) + func (svc *ZoneService) List(ctx context.Context) ([]Zone, error) + func (svc *ZoneService) Search(ctx context.Context, search string, groupID int) ([]Zone, error) + func (svc *ZoneService) SetActive(ctx context.Context, zoneName string, isActive bool) (result StatusResult, err error) + func (svc *ZoneService) TriggerUpdate(ctx context.Context, zoneName string) (result StatusResult, err error) + type ZoneType int + const ZoneTypeGeoDNS + const ZoneTypeMaster + const ZoneTypeParked + const ZoneTypeSlave + const ZoneTypeUnknown + func (zt *ZoneType) UnmarshalJSON(data []byte) error + type ZoneUpdateStatus struct + IPv4 string + IPv6 string + IsUpdated APIBool + Server string + type ZoneUsage struct + Current int + Limit int