ddnsman

package module
v0.0.0-...-383d125 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: MIT Imports: 53 Imported by: 0

README

ddnsman

ddnsman (short for Dynamic DNS Manager) allows to set external IP as a DNS record for your DNS provider.

Supported providers

ddnsman uses github.com/libdns to communicate with a list of various providers, i.e. if libdns allows to work with specific DNS provider you may use it with ddnsman.

Settings

Here is an example:

{
  "interval": "5m", // See https://pkg.go.dev/time#ParseDuration.
  "settings": [
    {
      "domain": "example.com", // Your domain.
      "provider": {
        "name": "someprovider", // Any provider supported by libdns.
        "settings": {} // This data is passed directly to provider driver.
      },
      "records": [ // Any records you want to update.
        "subdomain",
        "*.wildcard",
      ]
    }
  ],
  "shoutrrr_notifications": [
    {
      "url": "...", // shoutrrr url.
      "settings": {} // additional settings for shoutrrr (just a QoL feature, you may use params as well).
    }
  ]
}

Proper docs are coming soon.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Interval      time.Duration           `json:"interval"`
	Settings      []Setting               `json:"settings"`
	ShoutrrrAddrs []ShoutrrrNotifications `json:"shoutrrr_notifications"`
}

func LoadConfiguration

func LoadConfiguration() (*Configuration, error)

type Provider

type Provider interface {
	libdns.RecordGetter
	libdns.RecordSetter
}

Providers allows get and set records to DNS provider.

type Setting

type Setting struct {
	Domain   string   `json:"domain"`
	Records  []string `json:"records"`
	Provider struct {
		Name     string          `json:"name"`
		Settings json.RawMessage `json:"settings"`
	} `json:"provider"`
	// contains filtered or unexported fields
}

type ShoutrrrNotifications

type ShoutrrrNotifications struct {
	URL      string            `json:"url"`
	Settings map[string]string `json:"settings"`
}

type Updater

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

func New

func New(config *Configuration) (*Updater, error)

func (*Updater) Start

func (u *Updater) Start(ctx context.Context) error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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