infomaniak for libdns
This package implements the libdns interfaces for infomaniak based on their API reference, allowing you to manage DNS records.
import "github.com/libdns/infomaniak"
provider := &infomaniak.Provider{
APIToken: "YOUR_API_TOKEN"
}Please login to your infomaniak account and then navigate here to issue your API access token. The scope of your token has to include "domain:read", "dns:read" and "dns:write".
⚠️ All releases up to and including v0.1.3 use an unsupported API version and require a different scope for your token. If you use any of these releases, please make sure the "domain" scope is include for your token instead of the ones listed above.
The repository contains configurations for a Visual Studio Code dev container. Please install the Visual Studio Code extension ms-vscode-remote.remote-containers to make use of it.
If you use the provided Dev Container, you can easily test your changes directly with caddy. Start by replacing the three placeholders for email, API token and domain in .devcontainer/.caddyfile (make sure to never commit these changes). You can then use the commands below directly in your Dev Container.
After each change, you have to rebuild caddy with the following command - make sure to enter a valid version of caddy:
xcaddy build <caddy_version> --with dns.providers.infomaniak=/workspaces/caddy-dns-infomaniak --replace github.com/libdns/infomaniak=/workspaces/libdns-infomaniak --output /workspaces/caddy/caddy
Run caddy with the following command and monitor the output:
/workspaces/caddy/caddy run --config /workspaces/caddy/.caddyfile
If caddy managed to successfully issue the certificate and you would like to test from scratch again, you have to delete the previously issued certificate by running
rm -R /home/vscode/.local/share/caddy