godaddy

package
Version: v0.0.0-...-7bf3b00 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2021 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config contains backend configuration

func DefaultConfig

func DefaultConfig() (*Config, error)

DefaultConfig returns the default backend configuration

func (*Config) AccessKey

func (c *Config) AccessKey(key string)

AccessKey allows setting the API access key

func (*Config) DefaultDomainName

func (c *Config) DefaultDomainName() string

DefaultDomainName returns the default domain name

func (*Config) DefaultRecordName

func (c *Config) DefaultRecordName() string

DefaultRecordName returns the default record name

func (*Config) DefaultRecordTTL

func (c *Config) DefaultRecordTTL() int

DefaultRecordTTL returns the default record ttl

func (*Config) Get

func (c *Config) Get(domain, name string, typ dns.RType) (string, error)

Get a record via the GoDaddy API

func (*Config) SecretKey

func (c *Config) SecretKey(key string)

SecretKey allows setting the API secret key

func (*Config) Upsert

func (c *Config) Upsert(domain, name, data string, typ dns.RType) error

Upsert a record via the GoDaddy API

type DNSError

type DNSError struct {
	Code    string `json:"code"`
	Message string `json:"message"`
	Fields  []struct {
		Path        string `json:"path"`
		PathRelated string `json:"pathRelated"`
		Code        string `json:"code"`
		Message     string `json:"message"`
	} `json:"fields"`
}

DNSError represents the GoDaddy model shared across the domain APIs https://developer.godaddy.com/doc#!/_v1_domains/list/Error

type DNSErrorLimit

type DNSErrorLimit struct {
	RetryAfterSec int `json:"retryAfterSec"`
	DNSError
}

DNSErrorLimit represents the GoDaddy model shared across domain APIs https://developer.godaddy.com/doc#!/_v1_domains/list/ErrorLimit

type DNSRecord

type DNSRecord struct {
	Type     string  `json:"type" validate:"required,eq=A|eq=AAAA|eq=CNAME|eq=MX|eq=NS|eq=SOA|eq=SRV|eq=TXT"`
	Name     string  `json:"name" validate:"required,min=1,max=255"`
	Data     string  `json:"data" validate:"required,min=1,max=255"`
	Priority *int    `json:"priority,omitempty" validate:"omitempty,gte=1"`
	TTL      *int    `json:"ttl,omitempty" validate:"omitempty,gte=1"`
	Service  *string `json:"service,omitempty" validate:"omitempty,min=1"`
	Protocol *string `json:"protocol,omitempty" validate:"omitempty,min=1"`
	Port     *int    `json:"port,omitempty" validate:"omitempty,min=1,max=65535"`
	Weight   *int    `json:"weight,omitempty" validate:"omitempty,gte=1"`
}

DNSRecord represents an element of the GoDaddy model https://developer.godaddy.com/doc#!/_v1_domains/recordReplace/ArrayOfDNSRecord

type DNSRecords

type DNSRecords []DNSRecord

DNSRecords represents the GoDaddy model https://developer.godaddy.com/doc#!/_v1_domains/recordReplace/ArrayOfDNSRecord

Jump to

Keyboard shortcuts

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