Skip to content

Latest commit

 

History

History
54 lines (38 loc) · 1.42 KB

README.md

File metadata and controls

54 lines (38 loc) · 1.42 KB

INWX for libdns

Go Reference Tests

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

This provider uses the JSON-RPC API, which is described in the official documentation.

Authenticating

To authenticate you need to supply following credentials:

  • Your INWX username
  • Your INWX password
  • A shared secret if you have enabled Mobile TAN (two-factor authentication)

Example

package main

import (
    "context"
    "fmt"

    "github.com/libdns/inwx"
)

func main() {
    provider := &inwx.Provider{
        Username: "<username>",
        Password: "<password>",
        SharedSecret: "<sharedSecret>",
        // Uncomment the following line, if the test environment should be used:
        // EndpointURL: "https://api.ote.domrobot.com/jsonrpc/"
    }
    zone := "example.com."

    records, err := provider.GetRecords(context.TODO(), zone)

    if err != nil {
        fmt.Printf("Error: %s", err.Error())
        return
    }

    fmt.Println(records)
}