feat: Implement configuration management and DNS provider integration
- Added configuration management using Viper in internal/config/config.go - Implemented ClientConfig, ServerConfig, TLSConfig, HetznerConfig, UpstreamConfig, and main Config struct. - Created LoadConfig function to read and validate configuration files. - Developed Hetzner DNS provider in internal/provider/hetzner/hetzner.go with methods for updating DNS records. - Added comprehensive unit tests for configuration loading and Hetzner provider functionality. - Established HTTP server with metrics and update endpoint in internal/server/server.go. - Implemented request handling, authorization, and error management in the server. - Created integration tests for the Hetzner provider API interactions. - Removed legacy dynamic DNS integration tests in favor of the new API-based approach.
This commit is contained in:
17
config.yaml
Normal file
17
config.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
server:
|
||||
bind_address: ":9090"
|
||||
tls:
|
||||
enabled: false
|
||||
cert_file: "cert.pem"
|
||||
key_file: "key.pem"
|
||||
upstream:
|
||||
provider: hetzner
|
||||
hetzner:
|
||||
api_token: "YOUR_HETZNER_API_TOKEN"
|
||||
clients:
|
||||
client1:
|
||||
secret: "s3cr3t123"
|
||||
exact:
|
||||
- "home.example.com"
|
||||
wildcard:
|
||||
- "example.net"
|
||||
Reference in New Issue
Block a user