dns

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IntializeLogging

func IntializeLogging(logger *logrus.Logger)

IntializeLogging sets the logger to use in this library

func IsValidIPv4Addr

func IsValidIPv4Addr(addr string) bool

IsValidIPv4Addr returns true if the given address is a valid IPv4 address

func IsValidIPv6Addr

func IsValidIPv6Addr(addr string) bool

IsValidIPv6Addr returns true if the given address is a valid IPv6 address

func SplitDomainRecord

func SplitDomainRecord(domainRecord string) (domain string, record string)

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 Name

type Name string

Name is the provider name

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

type ProviderConfig map[string]string

ProviderConfig is the generic config format

Jump to

Keyboard shortcuts

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