Documentation
¶
Index ¶
- func IntializeLogging(logger *logrus.Logger)
- func IsValidIPv4Addr(addr string) bool
- func IsValidIPv6Addr(addr string) bool
- func SplitDomainRecord(domainRecord string) (domain string, record string)
- type CloudflareDNS
- type CustomScriptDNS
- type DigitalOceanDNS
- type Name
- type Provider
- type ProviderConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IntializeLogging ¶
IntializeLogging sets the logger to use in this library
func IsValidIPv4Addr ¶
IsValidIPv4Addr returns true if the given address is a valid IPv4 address
func IsValidIPv6Addr ¶
IsValidIPv6Addr returns true if the given address is a valid IPv6 address
func SplitDomainRecord ¶
SplitDomainRecord splits a record into a domain and record name
Types ¶
type CloudflareDNS ¶
type CloudflareDNS struct {
// contains filtered or unexported fields
}
CloudflareDNS instance
func NewCloudflareDNS ¶
func NewCloudflareDNS(config ProviderConfig) (*CloudflareDNS, error)
NewCloudflareDNS is CloudflareDNS constructor
func (*CloudflareDNS) GetName ¶
func (c *CloudflareDNS) GetName() Name
GetName returns name identifier
func (*CloudflareDNS) SyncAAAARecord ¶
func (c *CloudflareDNS) SyncAAAARecord(ipv6Address string) error
SyncAAAARecord sets an AAAA record to the given IPv6 address
func (*CloudflareDNS) SyncARecord ¶
func (c *CloudflareDNS) SyncARecord(ipv4Address string) error
SyncARecord sets an A record to the given IPv4 address
func (*CloudflareDNS) SyncRecord ¶
func (c *CloudflareDNS) SyncRecord(recordType string, ipAddress string) error
SyncRecord sets the given record to match ipAddress
type CustomScriptDNS ¶
type CustomScriptDNS struct {
// contains filtered or unexported fields
}
CustomScriptDNS instance
func NewCustomScriptDNS ¶
func NewCustomScriptDNS(config ProviderConfig) (*CustomScriptDNS, error)
NewCustomScriptDNS is CustomScriptDNS constructor
func (*CustomScriptDNS) GetName ¶
func (c *CustomScriptDNS) GetName() Name
GetName returns name identifier
func (*CustomScriptDNS) SyncAAAARecord ¶
func (c *CustomScriptDNS) SyncAAAARecord(ipv6Address string) error
SyncAAAARecord sets an AAAA record to the given IPv6 address
func (*CustomScriptDNS) SyncARecord ¶
func (c *CustomScriptDNS) SyncARecord(ipv4Address string) error
SyncARecord sets an A record to the given IPv4 address
func (*CustomScriptDNS) SyncRecord ¶
func (c *CustomScriptDNS) SyncRecord(recordType string, ipAddress string) error
SyncRecord sets the given record to match ipAddress
type DigitalOceanDNS ¶
type DigitalOceanDNS struct {
// contains filtered or unexported fields
}
DigitalOceanDNS instance
func NewDigitalOceanDNS ¶
func NewDigitalOceanDNS(config ProviderConfig) (*DigitalOceanDNS, error)
NewDigitalOceanDNS is DigitalOceanDNS constructor
func (*DigitalOceanDNS) GetName ¶
func (d *DigitalOceanDNS) GetName() Name
GetName returns name identifier
func (*DigitalOceanDNS) SyncAAAARecord ¶
func (d *DigitalOceanDNS) SyncAAAARecord(ipv6Address string) error
SyncAAAARecord sets an AAAA record to the given IPv6 address
func (*DigitalOceanDNS) SyncARecord ¶
func (d *DigitalOceanDNS) SyncARecord(ipv4Address string) error
SyncARecord sets an A record to the given IPv4 address
func (*DigitalOceanDNS) SyncRecord ¶
func (d *DigitalOceanDNS) SyncRecord(recordType string, ipAddress string) error
SyncRecord sets the given record to match ipAddress
type Provider ¶
type Provider interface { SyncARecord(ipv4Address string) error SyncAAAARecord(ipv6Address string) error GetName() Name }
Provider generic interface
func GetDNSProvider ¶
func GetDNSProvider(config ProviderConfig) (dns Provider, err error)
GetDNSProvider returns a provider from a given config
type ProviderConfig ¶
ProviderConfig is the generic config format