feat: change detector
This commit is contained in:
16
pkg/dnsProvider/__mocks__/testNewCanCreateIonosProvider.yaml
Normal file
16
pkg/dnsProvider/__mocks__/testNewCanCreateIonosProvider.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
ip_provider:
|
||||
type: plain
|
||||
config:
|
||||
url: https://ifconfig.me
|
||||
dns_provider:
|
||||
type: ionos
|
||||
config:
|
||||
api_key: exampleAPIKey
|
||||
base_url: https://example.com
|
||||
domains:
|
||||
- tld: example.com
|
||||
subdomains:
|
||||
- "@"
|
||||
- www
|
||||
check_interval: 0 0 0/6 * * * *
|
||||
11
pkg/dnsProvider/dnsProvider.go
Normal file
11
pkg/dnsProvider/dnsProvider.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package dnsProvider
|
||||
|
||||
import (
|
||||
"net"
|
||||
"realdnydns/model/common"
|
||||
)
|
||||
|
||||
type DNSProvider interface {
|
||||
UpdateRecord(tld string, subdomain string, ip net.IP, ttl int, prio int, disabled bool) (*common.ARecord, error)
|
||||
GetRecord(tld string, subdomain string) (*common.ARecord, error)
|
||||
}
|
||||
Reference in New Issue
Block a user