Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 1.32 KB

File metadata and controls

45 lines (34 loc) · 1.32 KB

WEDOS DNS for libdns

Go Reference

This package implements the libdns interfaces for WEDOS, allowing you to manage DNS records.

Authentication

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.

Usage

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)
}

Known limitations

  • WEDOS allows TTL values from 300 to 172800. Setting your records with TTL=0 will fail.