ddns

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrEmptyResponse is returned when the ip service returns an empty
	// response.
	ErrEmptyResponse = errors.New("empty response")
	// ErrInvalidIP is returned when the ip service returns an invalid IP.
	ErrInvalidIP = errors.New("invalid ip address")
	// ErrUnsupported is returned if the provider does not support the update
	// mode.
	ErrUnsupported = errors.New("unsupported")

	// ErrUnexpectedResponse is returned when the ip service returns an
	// unexpected response status code.
	ErrUnexpectedResponse = errors.New("unexpected response")
)

Functions

func GetIPv4

func GetIPv4() (net.IP, error)

GetIPv4 returns the IPv4 address of the current machine.

func GetIPv6

func GetIPv6() (net.IP, error)

GetIPv6 returns the IPv6 address of the current machine.

Types

type Provider

type Provider interface {
	// Update updates the DNS provider using the specified update mode.
	// One or both of ipv4 or ipv6 may be included. If both are included,
	// both the 'A' and 'AAAA' records will be updated. If only one is
	// included, only the corresponding record will be updated. If neither
	// are included, the function should return an error.
	Update(ipv4, ipv6 net.IP) error
}

Provider is an interface for dynamically updating the IP address on a DNS provider.

Directories

Path Synopsis
providers
noip
Package noip implements the No-IP dynamic DNS provider.
Package noip implements the No-IP dynamic DNS provider.

Jump to

Keyboard shortcuts

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