ddns

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FQDN added in v0.8.0

func FQDN(hostname, zone string) string

FQDN returns a fully qualified domain name given a hostname and a zone.

func RegisterProvider

func RegisterProvider(providerName string, factory ProviderFactory)

func SplitFQDN added in v0.8.0

func SplitFQDN(fqdn string) (string, string)

SplitFQDN splits a fully qualified domain name into hostname and domain parts.

Types

type Cloudflare

type Cloudflare struct {
	APIToken string        `json:"api_token"`
	Zone     string        `json:"zone"`
	TTL      time.Duration `json:"ttl"`
	Proxied  bool          `json:"proxied"`
}

func (*Cloudflare) Domain added in v0.3.0

func (c *Cloudflare) Domain(hostname string) string

func (*Cloudflare) MarshalJSON

func (d *Cloudflare) MarshalJSON() ([]byte, error)

func (*Cloudflare) PrettyPrint

func (c *Cloudflare) PrettyPrint(prefix string) ([]byte, error)

func (*Cloudflare) UnmarshalJSON

func (d *Cloudflare) UnmarshalJSON(b []byte) error

func (*Cloudflare) Update

func (c *Cloudflare) Update(hostname string, addrCollection *ipv6disc.AddrCollection) error

type DuckDNS

type DuckDNS struct {
	APIToken string `json:"api_token"`
}

func (*DuckDNS) Domain added in v0.3.0

func (d *DuckDNS) Domain(hostname string) string

func (*DuckDNS) PrettyPrint

func (d *DuckDNS) PrettyPrint(prefix string) ([]byte, error)

func (*DuckDNS) Update

func (d *DuckDNS) Update(hostname string, addrCollection *ipv6disc.AddrCollection) error

type Gravity added in v0.2.0

type Gravity struct {
	Server string        `json:"server"`
	APIKey string        `json:"api_key"`
	Zone   string        `json:"zone"`
	TTL    time.Duration `json:"ttl"`
}

func (*Gravity) Domain added in v0.3.0

func (g *Gravity) Domain(hostname string) string

func (*Gravity) MarshalJSON added in v0.2.0

func (g *Gravity) MarshalJSON() ([]byte, error)

func (*Gravity) PrettyPrint added in v0.2.0

func (g *Gravity) PrettyPrint(prefix string) ([]byte, error)

func (*Gravity) UnmarshalJSON added in v0.2.0

func (g *Gravity) UnmarshalJSON(b []byte) error

func (*Gravity) Update added in v0.2.0

func (g *Gravity) Update(hostname string, addrCollection *ipv6disc.AddrCollection) error

type LocalRunner added in v0.10.0

type LocalRunner struct{}

func (*LocalRunner) Close added in v0.10.0

func (l *LocalRunner) Close() error

func (*LocalRunner) RunPS added in v0.10.0

func (l *LocalRunner) RunPS(psScript string) ([]byte, error)

type Mikrotik added in v0.7.0

type Mikrotik struct {
	Address        string        `json:"address"`
	UseTLS         bool          `json:"use_tls"`
	TLSFingerprint string        `json:"tls_fingerprint"`
	Username       string        `json:"username"`
	Password       string        `json:"password"`
	Zone           string        `json:"zone"`
	TTL            time.Duration `json:"ttl"`
}

func (*Mikrotik) Domain added in v0.7.0

func (m *Mikrotik) Domain(hostname string) string

func (*Mikrotik) MarshalJSON added in v0.7.0

func (m *Mikrotik) MarshalJSON() ([]byte, error)

func (*Mikrotik) PrettyPrint added in v0.7.0

func (m *Mikrotik) PrettyPrint(prefix string) ([]byte, error)

func (*Mikrotik) UnmarshalJSON added in v0.7.0

func (m *Mikrotik) UnmarshalJSON(b []byte) error

func (*Mikrotik) Update added in v0.7.0

func (m *Mikrotik) Update(hostname string, addrCollection *ipv6disc.AddrCollection) error

type OpenWrt added in v0.8.0

type OpenWrt struct {
	Address  string        `json:"address"`
	Username string        `json:"username"`
	Password string        `json:"password"`
	SSHKey   string        `json:"ssh_key"`
	Zone     string        `json:"zone"`
	TTL      time.Duration `json:"ttl"`
}

func (*OpenWrt) Domain added in v0.8.0

func (o *OpenWrt) Domain(hostname string) string

func (*OpenWrt) MarshalJSON added in v0.8.0

func (o *OpenWrt) MarshalJSON() ([]byte, error)

func (*OpenWrt) PrettyPrint added in v0.8.0

func (o *OpenWrt) PrettyPrint(prefix string) ([]byte, error)

func (*OpenWrt) UnmarshalJSON added in v0.8.0

func (o *OpenWrt) UnmarshalJSON(b []byte) error

func (*OpenWrt) Update added in v0.8.0

func (o *OpenWrt) Update(hostname string, addrCollection *ipv6disc.AddrCollection) error

type OpnsenseUnbound added in v0.8.0

type OpnsenseUnbound struct {
	Address        string        `json:"address"`
	TLSFingerprint string        `json:"tls_fingerprint"`
	Key            string        `json:"key"`
	Secret         string        `json:"secret"`
	Zone           string        `json:"zone"`
	TTL            time.Duration `json:"ttl"`
}

func (*OpnsenseUnbound) Domain added in v0.8.0

func (c *OpnsenseUnbound) Domain(hostname string) string

func (*OpnsenseUnbound) MarshalJSON added in v0.8.0

func (u *OpnsenseUnbound) MarshalJSON() ([]byte, error)

func (*OpnsenseUnbound) PrettyPrint added in v0.8.0

func (u *OpnsenseUnbound) PrettyPrint(prefix string) ([]byte, error)

func (*OpnsenseUnbound) UnmarshalJSON added in v0.8.0

func (u *OpnsenseUnbound) UnmarshalJSON(b []byte) error

func (*OpnsenseUnbound) Update added in v0.8.0

func (u *OpnsenseUnbound) Update(hostname string, addrCollection *ipv6disc.AddrCollection) error

type PfsenseRestapiUnbound added in v0.8.0

type PfsenseRestapiUnbound struct {
	Address        string        `json:"address"`
	TLSFingerprint string        `json:"tls_fingerprint"`
	Key            string        `json:"key"`
	Zone           string        `json:"zone"`
	TTL            time.Duration `json:"ttl"`
}

func (*PfsenseRestapiUnbound) Domain added in v0.8.0

func (c *PfsenseRestapiUnbound) Domain(hostname string) string

func (*PfsenseRestapiUnbound) MarshalJSON added in v0.8.0

func (u *PfsenseRestapiUnbound) MarshalJSON() ([]byte, error)

func (*PfsenseRestapiUnbound) PrettyPrint added in v0.8.0

func (u *PfsenseRestapiUnbound) PrettyPrint(prefix string) ([]byte, error)

func (*PfsenseRestapiUnbound) UnmarshalJSON added in v0.8.0

func (u *PfsenseRestapiUnbound) UnmarshalJSON(b []byte) error

func (*PfsenseRestapiUnbound) Update added in v0.8.0

func (u *PfsenseRestapiUnbound) Update(hostname string, addrCollection *ipv6disc.AddrCollection) error

type ProviderFactory

type ProviderFactory func(ProviderSettings) Service

type ProviderSettings

type ProviderSettings interface{}

type Route53 added in v0.8.1

type Route53 struct {
	AccessKeyID     string        `json:"access_key_id"`
	SecretAccessKey string        `json:"secret_access_key"`
	Region          string        `json:"region"`
	HostedZoneID    string        `json:"hosted_zone_id"`
	TTL             time.Duration `json:"ttl"`
	// contains filtered or unexported fields
}

func (*Route53) Domain added in v0.8.1

func (r *Route53) Domain(hostname string) string

func (*Route53) MarshalJSON added in v0.8.1

func (r *Route53) MarshalJSON() ([]byte, error)

func (*Route53) PrettyPrint added in v0.8.1

func (r *Route53) PrettyPrint(prefix string) ([]byte, error)

func (*Route53) UnmarshalJSON added in v0.8.1

func (r *Route53) UnmarshalJSON(b []byte) error

func (*Route53) Update added in v0.8.1

func (r *Route53) Update(hostname string, addrCollection *ipv6disc.AddrCollection) error

type SSHRunner added in v0.10.0

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

func NewSSHRunner added in v0.10.0

func NewSSHRunner(address, username, password, keyPath string) (*SSHRunner, error)

func (*SSHRunner) Close added in v0.10.0

func (s *SSHRunner) Close() error

func (*SSHRunner) RunPS added in v0.10.0

func (s *SSHRunner) RunPS(psScript string) ([]byte, error)

type Service

type Service interface {
	Update(hostname string, addresses *ipv6disc.AddrCollection) error
	PrettyPrint(string) ([]byte, error)
	Domain(hostname string) string
}

func NewCloudflare

func NewCloudflare(settings ProviderSettings) Service

func NewDuckDNS

func NewDuckDNS(settings ProviderSettings) Service

func NewGravity added in v0.2.0

func NewGravity(settings ProviderSettings) Service

func NewMikrotik added in v0.7.0

func NewMikrotik(settings ProviderSettings) Service

func NewOpenWrt added in v0.8.0

func NewOpenWrt(settings ProviderSettings) Service

func NewOpnsenseUnbound added in v0.8.0

func NewOpnsenseUnbound(settings ProviderSettings) Service

func NewPfsenseRestapiUnbound added in v0.8.0

func NewPfsenseRestapiUnbound(settings ProviderSettings) Service

func NewRoute53 added in v0.8.1

func NewRoute53(settings ProviderSettings) Service

func NewService added in v0.3.0

func NewService(provider string, config ProviderSettings) (Service, error)

func NewTechnitium added in v0.8.0

func NewTechnitium(settings ProviderSettings) Service

func NewWindowsDNS added in v0.10.0

func NewWindowsDNS(settings ProviderSettings) Service

type Technitium added in v0.8.0

type Technitium struct {
	Address        string        `json:"address"`
	TLSFingerprint string        `json:"tls_fingerprint"`
	Token          string        `json:"token"`
	Zone           string        `json:"zone"`
	TTL            time.Duration `json:"ttl"`
}

func (*Technitium) Domain added in v0.8.0

func (t *Technitium) Domain(hostname string) string

func (*Technitium) MarshalJSON added in v0.8.0

func (t *Technitium) MarshalJSON() ([]byte, error)

func (*Technitium) PrettyPrint added in v0.8.0

func (t *Technitium) PrettyPrint(prefix string) ([]byte, error)

func (*Technitium) UnmarshalJSON added in v0.8.0

func (t *Technitium) UnmarshalJSON(b []byte) error

func (*Technitium) Update added in v0.8.0

func (t *Technitium) Update(hostname string, addrCollection *ipv6disc.AddrCollection) error

type WindowsDNS added in v0.10.0

type WindowsDNS struct {
	Zone     string        `json:"zone"`
	Address  string        `json:"address"` // Optional: if set, use SSH
	Username string        `json:"username"`
	Password string        `json:"password"`
	SSHKey   string        `json:"ssh_key"`
	TTL      time.Duration `json:"ttl"`
}

func (*WindowsDNS) Domain added in v0.10.0

func (w *WindowsDNS) Domain(hostname string) string

func (*WindowsDNS) MarshalJSON added in v0.10.0

func (w *WindowsDNS) MarshalJSON() ([]byte, error)

func (*WindowsDNS) PrettyPrint added in v0.10.0

func (w *WindowsDNS) PrettyPrint(prefix string) ([]byte, error)

func (*WindowsDNS) UnmarshalJSON added in v0.10.0

func (w *WindowsDNS) UnmarshalJSON(b []byte) error

func (*WindowsDNS) Update added in v0.10.0

func (w *WindowsDNS) Update(hostname string, addrCollection *ipv6disc.AddrCollection) error

type WindowsRunner added in v0.10.0

type WindowsRunner interface {
	RunPS(psScript string) ([]byte, error)
	Close() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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