feat: add mode selecting (#15)
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de> Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
This commit was merged in pull request #15.
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
---
|
||||
ip_provider:
|
||||
type: plain
|
||||
config:
|
||||
url: https://ifconfig.me
|
||||
url: https://example.com
|
||||
dns_provider:
|
||||
type: ionos
|
||||
config:
|
||||
api_key: exampleAPIKey
|
||||
api_key: exampleapikey
|
||||
base_url: https://example.com
|
||||
domains:
|
||||
- tld: example.com
|
||||
subdomains:
|
||||
- "@"
|
||||
- www
|
||||
check_interval: 0 0 0/6 * * * *
|
||||
check_interval: 0 0 * * * *
|
||||
mode: RunOnce
|
||||
|
||||
2
pkg/config/__mocks__/testLoadInvalidMode.yaml
Normal file
2
pkg/config/__mocks__/testLoadInvalidMode.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
mode: "InvalidMode"
|
||||
check_interval: "5m"
|
||||
3
pkg/config/__mocks__/testLoadInvalidYAML.yaml
Normal file
3
pkg/config/__mocks__/testLoadInvalidYAML.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
mode: "Scheduled"
|
||||
check_interval: "5m"
|
||||
- invalid_content
|
||||
3
pkg/config/__mocks__/testLoadMissingCheckInterval.yaml
Normal file
3
pkg/config/__mocks__/testLoadMissingCheckInterval.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
mode: "Scheduled"
|
||||
ip_provider:
|
||||
type: "plain"
|
||||
Reference in New Issue
Block a user