WEDOS DNS for libdns
This package implements the libdns interfaces for WEDOS, allowing you to manage DNS records.
WEDOS API (WAPI) doesn't use API keys, but rather login username and password (precisely their SHA-1 hash). To get started, please see the official instructions here. Please note that your WAPI password is different from your Wedos account password.
When your WAPI account is ready, put your username (email) in the Username field and your WAPI password in the Password field.
You can also use enviromental variables instaed of hardcoding your credentials.
package main
import (
"context"
"os"
"log"
"github.com/libdns/wedos"
)
func main() {
provider := wedos.Provider{
Username: os.Getenv("WEDOS_USERNAME"),
Password: os.Getenv("WEDOS_PASSWORD"),
}
records, err := provider.GetRecords(context, "example.org")
if err != nil {
log.Fatalf("Unexpected error: %s", err)
}
fmt.Printf("%#v", records)
}- WEDOS allows
TTLvalues from300to172800. Setting your records withTTL=0will fail.