pteich / caddy-tlsconsul

🔒 Consul K/V storage for Caddy Web Server / Certmagic TLS data
Apache License 2.0
98 stars 18 forks source link

Implement caddyfile.Unmarshaler interface for Caddyfile support #11

Closed pteich closed 4 years ago

pteich commented 4 years ago

This PR adds support for setting config values using Caddyfile.

storage consul {
       address      "127.0.0.1:8500"
       token        "consul-access-token"
       timeout      10
       prefix       "caddytls"
       value_prefix "myprefix"
       aes_key      "consultls-1234567890-caddytls-32"
       tls_enabled  "false"
       tls_insecure "true"
}

Setting config values by environment is still active.

In addition there is a lot of code cleaning, splitting of files and changes in handling of config value in general.

Fixes #9