Skip to content

Commit

Permalink
chore(all): rename host to owner
Browse files Browse the repository at this point in the history
- Retro-compatible change, `host` field still works
- Documentation updated to use `owner` field
- Code updated to use owner variable name
  • Loading branch information
qdm12 committed Jun 27, 2024
1 parent 711b1ac commit 32fafec
Show file tree
Hide file tree
Showing 123 changed files with 713 additions and 690 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ In more detailed steps:

```go
case constants.Example:
return example.New(data, domain, host, ipVersion, ipv6Suffix)
return example.New(data, domain, owner, ipVersion, ipv6Suffix)
```

1. Copy the file [`docs/example.md`](../docs/example.md) to `docs/yourprovider.md` and modify it to fit the configuration and domain setup of your DNS provider. There are a few `<!-- ... -->` comments indicating what to change, please **remove them** when done.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Program to keep DNS A and/or AAAA records updated for multiple DNS providers
{
"provider": "namecheap",
"domain": "example.com",
"host": "@",
"owner": "@",
"password": "e5322165c1d74692bfa6d807100c0310"
}
]
Expand Down Expand Up @@ -155,7 +155,7 @@ Program to keep DNS A and/or AAAA records updated for multiple DNS providers
{
"provider": "namecheap",
"domain": "example.com",
"host": "@",
"owner": "@",
"password": "e5322165c1d74692bfa6d807100c0310"
}
]
Expand Down Expand Up @@ -245,7 +245,7 @@ Check the documentation for your DNS provider:

Note that:

- you can specify multiple hosts for the same domain using a comma separated list. For example with `"host": "@,subdomain1,subdomain2",`.
- you can specify multiple hosts for the same domain using a comma separated list. For example with `"owner": "@,subdomain1,subdomain2",`.

### Environment variables

Expand Down
4 changes: 2 additions & 2 deletions cmd/updater/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,10 @@ func readRecords(providers []provider.Provider, persistentDB *persistence.Databa
records = make([]recordslib.Record, len(providers))
for i, provider := range providers {
logger.Info("Reading history from database: domain " +
provider.Domain() + " host " + provider.Host() +
provider.Domain() + " owner " + provider.Owner() +
" " + provider.IPVersion().String())
events, err := persistentDB.GetEvents(provider.Domain(),
provider.Host(), provider.IPVersion())
provider.Owner(), provider.IPVersion())
if err != nil {
shoutrrrClient.Notify(err.Error())
return nil, err
Expand Down
4 changes: 2 additions & 2 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"provider": "namecheap",
"domain": "example.com",
"host": "@",
"owner": "@",
"password": "e5322165c1d74692bfa6d807100c0310"
},
{
Expand All @@ -14,7 +14,7 @@
{
"provider": "godaddy",
"domain": "example.org",
"host": "subdomain",
"owner": "subdomain",
"key": "aaaaaaaaaaaaaaaa",
"secret": "aaaaaaaaaaaaaaaa"
},
Expand Down
4 changes: 2 additions & 2 deletions docs/aliyun.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"provider": "aliyun",
"domain": "domain.com",
"host": "@",
"owner": "@",
"access_key_id": "your access_key_id",
"access_secret": "your access_secret",
"ip_version": "ipv4",
Expand All @@ -23,7 +23,7 @@
### Compulsory parameters

- `"domain"`
- `"host"` is your host and can be a subdomain or `"@"`
- `"owner"` is the resource record owner and can be `"@"` for the root domain or for example `"sub"` for the subdomain `sub.domain.com`
- `"access_key_id"`
- `"access_secret"`

Expand Down
4 changes: 2 additions & 2 deletions docs/allinkl.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"provider": "allinkl",
"domain": "domain.com",
"host": "host",
"owner": "sub",
"username": "dynXXXXXXX",
"password": "password",
"ip_version": "ipv4",
Expand All @@ -23,7 +23,7 @@
### Compulsory parameters

- `"domain"`
- `"host"` is your host (subdomain)
- `"owner"` is the resource record owner and can be `"@"` for the root domain or for example `"sub"` for the subdomain `sub.domain.com`
- `"username"` username (usually starts with dyn followed by numbers)
- `"password"` password in plain text

Expand Down
4 changes: 2 additions & 2 deletions docs/changeip.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"provider": "changeip",
"domain": "domain.com",
"host": "host",
"owner": "sub",
"username": "dynXXXXXXX",
"password": "password",
"ip_version": "ipv4",
Expand All @@ -23,7 +23,7 @@
### Compulsory parameters

- `"domain"`
- `"host"` is your host (subdomain)
- `"owner"` is the resource record owner and can be `"@"` for the root domain or for example `"sub"` for the subdomain `sub.domain.com`
- `"username"`
- `"password"`

Expand Down
4 changes: 2 additions & 2 deletions docs/cloudflare.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"provider": "cloudflare",
"zone_identifier": "some id",
"domain": "domain.com",
"host": "@",
"owner": "@",
"ttl": 600,
"token": "yourtoken",
"ip_version": "ipv4",
Expand All @@ -25,7 +25,7 @@

- `"zone_identifier"` is the Zone ID of your site, from the domain overview page written as *Zone ID*
- `"domain"`
- `"host"` is your host and can be `"@"`, a subdomain or the wildcard `"*"`.
- `"owner"` is the resource record owner and can be `"@"` for the root domain, `"*"` for the wildcard, or for example `"sub"` for the subdomain `sub.domain.com`
See [this issue comment for context](https://github.com/qdm12/ddns-updater/issues/243#issuecomment-928313949). This is left as is for compatibility.
- `"ttl"` integer value for record TTL in seconds (specify 1 for automatic)
- One of the following ([how to find API keys](https://developers.cloudflare.com/fundamentals/api/get-started/)):
Expand Down
4 changes: 2 additions & 2 deletions docs/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Feel free to open issues to extend its configuration options.
{
"provider": "custom",
"domain": "example.com",
"host": "@",
"owner": "@",
"url": "https://example.com/update?domain=example.com&host=@&username=username&client_key=client_key",
"ipv4key": "ipv4",
"ipv6key": "ipv6",
Expand All @@ -30,7 +30,7 @@ Feel free to open issues to extend its configuration options.
### Compulsory parameters

- `"domain"` is the domain name to update
- `"host"` is the host to update, which can be `"@"` (root), `"*"` or a subdomain
- `"owner"` is the resource record owner and can be `"@"` for the root domain, `"*"` for the wildcard, or for example `"sub"` for the subdomain `sub.domain.com`
- `"url"` is the URL to update your records and should contain all the information EXCEPT the IP address to update
- `"ipv4key"` is the URL query parameter name for the IPv4 address, for example `ipv4` will be added to the URL with `&ipv4=1.2.3.4`.
- `"ipv6key"` is the URL query parameter name for the IPv6 address, for example `ipv6` will be added to the URL with `&ipv6=::aaff`. Even if you don't use IPv6, this must be set to something.
Expand Down
4 changes: 2 additions & 2 deletions docs/dd24.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"provider": "dd24",
"domain": "domain.com",
"host": "@",
"owner": "@",
"password": "password",
"ip_version": "ipv4",
"ipv6_suffix": ""
Expand All @@ -22,7 +22,7 @@
### Compulsory parameters

- `"domain"`
- `"host"` is your host and can be a subdomain or `"@"`
- `"owner"` is the resource record owner and can be `"@"` for the root domain or for example `"sub"` for the subdomain `sub.domain.com`
- `"password"` is your password

### Optional parameters
Expand Down
4 changes: 2 additions & 2 deletions docs/ddnss.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"provider": "ddnss",
"provider_ip": true,
"domain": "domain.com",
"host": "@",
"owner": "@",
"username": "user",
"password": "password",
"dual_stack": false,
Expand All @@ -25,7 +25,7 @@
### Compulsory parameters

- `"domain"`
- `"host"` is your host and can be a subdomain or `"@"`
- `"owner"` is the resource record owner and can be `"@"` for the root domain or for example `"sub"` for the subdomain `sub.domain.com`
- `"username"`
- `"password"`

Expand Down
4 changes: 2 additions & 2 deletions docs/desec.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"provider": "desec",
"domain": "dedyn.io",
"host": "host",
"owner": "sub",
"token": "token",
"ip_version": "ipv4",
"ipv6_suffix": "",
Expand All @@ -23,7 +23,7 @@
### Compulsory parameters

- `"domain"`
- `"host"` can be `@` for the root domain or a subdomain or a wildcard subdomain (`*`), defaults to `@`
- `"owner"` is the resource record owner and can be `"@"` for the root domain, `"*"` for the wildcard, or for example `"sub"` for the subdomain `sub.domain.com`
- `"token"` is your token that you can create [here](https://desec.io/tokens)

### Optional parameters
Expand Down
4 changes: 2 additions & 2 deletions docs/digitalocean.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"provider": "digitalocean",
"domain": "domain.com",
"host": "@",
"owner": "@",
"token": "yourtoken",
"ip_version": "ipv4",
"ipv6_suffix": ""
Expand All @@ -22,7 +22,7 @@
### Compulsory parameters

- `"domain"`
- `"host"` is your host and can be a subdomain or `"@"` or `"*"`
- `"owner"` is the resource record owner and can be `"@"` for the root domain, `"*"` for the wildcard, or for example `"sub"` for the subdomain `sub.domain.com`
- `"token"` is your token that you can create [here](https://cloud.digitalocean.com/settings/applications)

### Optional parameters
Expand Down
4 changes: 2 additions & 2 deletions docs/dnsomatic.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"provider": "dnsomatic",
"domain": "domain.com",
"host": "@",
"owner": "@",
"username": "username",
"password": "password",
"provider_ip": true,
Expand All @@ -24,7 +24,7 @@
### Compulsory parameters

- `"domain"`
- `"host"` is your host and can be a subdomain or `"@"` or `"*"`
- `"owner"` is the resource record owner and can be `"@"` for the root domain, `"*"` for the wildcard, or for example `"sub"` for the subdomain `sub.domain.com`
- `"username"`
- `"password"`
- `"provider_ip"`
Expand Down
4 changes: 2 additions & 2 deletions docs/dnspod.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"provider": "dnspod",
"domain": "domain.com",
"host": "@",
"owner": "@",
"token": "yourtoken",
"ip_version": "ipv4",
"ipv6_suffix": ""
Expand All @@ -22,7 +22,7 @@
### Compulsory parameters

- `"domain"`
- `"host"` is your host and can be a subdomain or `"@"`
- `"owner"` is the resource record owner and can be `"@"` for the root domain or for example `"sub"` for the subdomain `sub.domain.com`
- `"token"`

### Optional parameters
Expand Down
4 changes: 2 additions & 2 deletions docs/dondominio.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"provider": "dondominio",
"domain": "domain.com",
"host": "@",
"owner": "@",
"name": "something",
"username": "username",
"key": "key",
Expand All @@ -24,7 +24,7 @@
### Compulsory parameters

- `"domain"`
- `"host"` is the subdomain to update which can be `@`, `*` or a subdomain
- `"owner"` is the resource record owner and can be `"@"` for the root domain, `"*"` for the wildcard, or for example `"sub"` for the subdomain `sub.domain.com`
- `"name"` is the name of the service/hosting
- `"username"`
- `"password"`
Expand Down
4 changes: 2 additions & 2 deletions docs/dreamhost.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"provider": "dreamhost",
"domain": "domain.com",
"host": "@",
"owner": "@",
"key": "key",
"ip_version": "ipv4",
"ipv6_suffix": ""
Expand All @@ -26,7 +26,7 @@

### Optional parameters

- `"host"` is your host and can be a subdomain or `"@"`. It defaults to `"@"`.
- `"owner"` is the resource record owner and can be `"@"` for the root domain or for example `"sub"` for the subdomain `sub.domain.com`
- `"ip_version"` can be `ipv4` (A records), or `ipv6` (AAAA records) or `ipv4 or ipv6` (update one of the two, depending on the public ip found). It defaults to `ipv4 or ipv6`.
- `"ipv6_suffix"` is the IPv6 interface identifier suffix to use. It can be for example `0:0:0:0:72ad:8fbb:a54e:bedd/64`. If left empty, it defaults to no suffix and the raw public IPv6 address obtained is used in the record updating.

Expand Down
4 changes: 2 additions & 2 deletions docs/duckdns.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"settings": [
{
"provider": "duckdns",
"host": "host",
"owner": "sub",
"token": "token",
"ip_version": "ipv4",
"ipv6_suffix": "",
Expand All @@ -21,7 +21,7 @@

### Compulsory parameters

- `"host"` is your host, for example `subdomain` for `subdomain.duckdns.org`
- `"owner"` is the resource record owner and can be for example `"sub"` for the domain `sub.duckdns.org`
- `"token"`

### Optional parameters
Expand Down
4 changes: 2 additions & 2 deletions docs/dyndns.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"provider": "dyn",
"domain": "domain.com",
"host": "@",
"owner": "@",
"username": "username",
"client_key": "client_key",
"ip_version": "ipv4",
Expand All @@ -23,7 +23,7 @@
### Compulsory parameters

- `"domain"`
- `"host"` is your host and can be a subdomain or `"@"` or `"*"`
- `"owner"` is the resource record owner and can be `"@"` for the root domain, `"*"` for the wildcard, or for example `"sub"` for the subdomain `sub.domain.com`
- `"username"`
- `"client_key"`

Expand Down
4 changes: 2 additions & 2 deletions docs/dynu.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"provider": "dynu",
"domain": "domain.com",
"host": "@",
"owner": "@",
"group": "group",
"username": "username",
"password": "password",
Expand All @@ -25,7 +25,7 @@
### Compulsory parameters

- `"domain"`
- `"host"` is your host and can be a subdomain or `"@"`
- `"owner"` is the resource record owner and can be `"@"` for the root domain or for example `"sub"` for the subdomain `sub.domain.com`
- `"username"`
- `"password"` could be plain text or password in MD5 or SHA256 format (There's also an option for setting a password for IP Update only)

Expand Down
4 changes: 2 additions & 2 deletions docs/dynv6.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"provider": "dynv6",
"domain": "domain.com",
"host": "@",
"owner": "@",
"token": "token",
"ip_version": "ipv4",
"ipv6_suffix": "",
Expand All @@ -23,7 +23,7 @@
### Compulsory parameters

- `"domain"`
- `"host"` is your host and can be a subdomain or `"@"`
- `"owner"` is the resource record owner and can be `"@"` for the root domain or for example `"sub"` for the subdomain `sub.domain.com`
- `"token"` that you can obtain [here](https://dynv6.com/keys#token)

### Optional parameters
Expand Down
4 changes: 2 additions & 2 deletions docs/easydns.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"provider": "easydns",
"domain": "domain.com",
"host": "@",
"owner": "@",
"username": "username",
"token": "token",
"ip_version": "ipv4",
Expand All @@ -24,7 +24,7 @@
### Compulsory parameters

- `"domain"`
- `"host"` is your host and can be a subdomain or `"@"` or `"*"`
- `"owner"` is the resource record owner and can be `"@"` for the root domain, `"*"` for the wildcard, or for example `"sub"` for the subdomain `sub.domain.com`
- `"username"`
- `"token"`

Expand Down
Loading

0 comments on commit 32fafec

Please sign in to comment.