func (c *Client) GetDomain(authZone string) (*Domain, error) {
	domainName := authZone[0 : len(authZone)-1]
	resource := fmt.Sprintf("%s%s", "/dns/managed/name?domainname=", domainName)
	resp, err := c.sendRequest(http.MethodGet, resource, nil)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	domain := &Domain{}
	err = json.NewDecoder(resp.Body).Decode(&domain)
	if err != nil {
		return nil, err
	}
	return domain, nil
}
GetDomain gets a domain.
package internal
import (
	"bytes"
	"crypto/hmac"
	"crypto/sha1"
	"encoding/hex"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"net/http"
	"time"
)
type Domain struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}
type Record struct {
	ID       int    `json:"id"`
	Type     string `json:"type"`
	Name     string `json:"name"`
	Value    string `json:"value"`
	TTL      int    `json:"ttl"`
	SourceID int    `json:"sourceId"`
}
type recordsResponse struct {
	Records *[]Record `json:"data"`
}
type Client struct {
	apiKey     string
	apiSecret  string
	BaseURL    string
	HTTPClient *http.Client
}
func NewClient(apiKey, apiSecret string) (*Client, error) {
	if apiKey == "" {
		return nil, errors.New("credentials missing: API key")
	}
	if apiSecret == "" {
		return nil, errors.New("credentials missing: API secret")
	}
	return &Client{
		apiKey:     apiKey,
		apiSecret:  apiSecret,
		HTTPClient: &http.Client{},
	}, nil
}